A hands-on ECS lab in fifteen slides, in the console, CloudShell and the CLI: check session 6's load balancer and EC2 fleet; build an nginx image with the project's page and push it to the ECR repository project-web; create the cluster project-cluster and the task definition project-web, and read its roles; run the Fargate service project-web-svc in the IP target group project-web-tg-ecs; shift the listener's traffic from the EC2 fleet with weighted target groups, stop the fleet, add service auto scaling; and clean up.
The slides
The tool is a hands-on lab in fifteen slides, one step each, with the steps to follow beside a terminal and a picture
of the lab's resources and the load balancer's weights.
- Introduction: what the lab makes.
- 1. The starting point
- Check the load balancer and the EC2 fleet: session 6's web tier, and how to rebuild it.
- 2. The image
- Build the image in CloudShell, Create the ECR repository and Push the image to ECR.
- 3. ECS
- Create the cluster, Create the task definition and Read the task definition's roles.
- 4. The service
- Create the IP target group, Create the Fargate service and See the tasks register in the target group.
- 5. The traffic shift
- Send 10% of the traffic to Fargate, Send all the traffic to Fargate and stop the fleet and Add service auto scaling.
- 6. Clean up: the listener back to the fleet, then the service, the cluster and the repository.
The buttons on the left and right edges move between slides. So do the arrow keys and a swipe.
The slides
Containers: ECS, Fargate, EKS explain what it uses.
The placeholders
The account ID is AWS's 111122223333; the load balancer's name, the target groups' IDs, the instance IDs and the
image digests are in the formats AWS prints. The tasks' addresses are in project-vpc's private subnets,
10.0.10.0/24 and 10.0.11.0/24.
Sources