This is a blank project for CDK development with TypeScript.
The cdk.json
file tells the CDK Toolkit how to execute your app.
npm run build
compile typescript to jsnpm run watch
watch for changes and compilenpm run test
perform the jest unit testscdk deploy
deploy this stack to your default AWS account/regioncdk diff
compare deployed stack with current statecdk synth
emits the synthesized CloudFormation template
- Step 1. Deploy EcrStack
- Step 2. Build and push an ECR image manulaly
- Step 3. Deploy the EcsStack
- Step 4. Deploy the CodePipelineChatbotStack
Important
Please provide parameters in /bin/aws-ecs-demo.ts Please provide Hugging Face API Key in /chatbot-app/.env Due to rate limite of free API, sometimes you might experience no response from the bot.
Step 1. Deploy EcrStack which create a ECR repository
cdk deploy EcrStack
Step 2. Deploy the EcsStack
Goto the bin directory and deploy the ecs cluster using cdk
cdk deploy EcsStack
Step 3. Deploy the CodePipeline
cdk deploy CodePipelineChatbotStack
Warning
Please be aware cdk issue when destroying ecs cluster
First destroy the codepipeline stack
cdk destroy CodePipelineChatbotStack
Then destroy the EcrStack
cdk destroy EcrStack
Finally destroy the EcsStack
cdk destroy EcsStack
It is possible to automate all in one big application, but for demo purpose, just make it simple.CodePipelineChatbotStack