A hands-on lab in nineteen slides, in the console and the CLI: delete what is left of the hand-built project, read the CloudFormation template project.yaml part by part, and create the stack project-stack from it (the VPC, the load balancer and the Auto Scaling group); preview a change of instance type with a change set and execute it; change the security group by hand, detect the drift, find who made the change in CloudTrail and undo it; create the SNS topic project-alarms, the alarms project-alb-5xx and project-cpu-high, test a notification, build the dashboard project, and clean up.
The slides
The tool is a hands-on lab in nineteen slides, one step each, with the steps to follow beside a terminal and a picture of
the stack, its resources, the topic, the alarms and the dashboard:
- Introduction: what the lab makes.
- 1. The hand-built project
- Check for the hand-built project, and delete it: the stack gives its resources the same names.
- 2. The template and the stack
- Read the template: the network, the load balancer, the web servers.
- Create the stack in the console:
project-stack, tagged project = aws-course. - Check what the stack made: its outputs, its 23 resources, the page.
- 3. A change set
- Create a change set: the instance type to
t3.small, previewed. - Execute the change set: the web servers replaced one at a time.
- 4. Drift
- Change the security group by hand, detect drift, find who made the change in CloudTrail, and undo the change and detect drift again.
- 5. Alarms and a dashboard
- Create the SNS topic project-alarms, the alarm project-alb-5xx (console) and the alarm project-cpu-high (CLI).
- Test the notification, and create the dashboard project.
- 6. Clean up: the dashboard, the alarms, the topic and the stack.
The buttons on the left and right edges move between slides. So do the arrow keys and a swipe.
The template is
project.yaml, to download and keep: later labs can
rebuild the project from it with one command. The slides
Observability and Infrastructure as Code explain what the lab uses.
The placeholders
The account ID is AWS's documentation placeholder, 111122223333; the instance IDs, the drift detection ID and the
load balancer's name and DNS name are placeholders in AWS's forms, and 192.0.2.10 is our own computer. The template
itself passes cfn-lint and CloudFormation's validate-template; the stack has not yet been created from it in a real
account, so the other outputs follow the CLI's service model.
Sources