To Nha Notes | July 18, 2024, 6:37 p.m.
The Copilot CLI is a tool for developers to build, release, and operate production-ready containerized applications on AWS App Runner and Amazon ECS on AWS Fargate. From getting started, pushing to staging, and releasing to production, Copilot can help manage the entire lifecycle of your application development.
AWS environment set up with a virtual private cloud (VPC), public and private subnets, and security groups
Amazon ECS cluster
Amazon ECS service and task definition
Amazon Elastic Container Registry (Amazon ECR)
Amazon DynamoDB
Application Load Balancer
AWS Fargate
Amazon Identity and Access Management (IAM)
Amazon CloudWatch
AWS CloudTrail
When you deploy the sample application for this pattern, multiple tasks are created and deployed in separate Availability Zones. Each task stores data in Amazon DynamoDB. When you access the webpage for a task, you can view the data from all other tasks.

https://docs.aws.amazon.com/AmazonECS/latest/developerguide/copilot-install.html
Deploy a sample web application that is cloned from a GitHub repository using the following command. For more information about AWS Copilot init and its flags, see the AWS Copilot documentation.
git clone https://github.com/aws-samples/aws-copilot-sample-service.git demo-app && \
cd demo-app && \
AWS_PROFILE=<AWS_PROFILE> copilot init --app demo \
--name api \
--type 'Load Balanced Web Service' \
--dockerfile './Dockerfile' \
--port 80 \
--deploy
After the deployment is complete, the copilot CLI will return a URL that you can use to verify the deployment. You can also use the following commands to verify the app's status.
AWS_PROFILE=<AWS_PROFILE> copilot app ls
AWS_PROFILE=<AWS_PROFILE> copilot app show
AWS_PROFILE=<AWS_PROFILE> copilot env ls
AWS_PROFILE=<AWS_PROFILE> copilot svc show
AWS_PROFILE=<AWS_PROFILE> copilot svc ls
AWS_PROFILE=<AWS_PROFILE> copilot svc logs
AWS_PROFILE=<AWS_PROFILE> copilot svc status
AWS_PROFILE=<AWS_PROFILE> copilot app delete
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS_Copilot.html
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/copilot-deploy.html
https://aws.github.io/copilot-cli/docs/getting-started/first-app-tutorial/
https://aws.github.io/copilot-cli/docs/commands/init/