Terraform on AWS: Nonprod and Production Environments · Containers and Compute: ECR, ECS Fargate and EC2

EC2 Workers: Launch Template, Auto Scaling Group and SSM Access

Provision a background worker fleet on EC2 using a launch template with IMDSv2 and an SSM instance profile instead of SSH, and add a nonprod schedule that scales to zero at night.

Members can save this page, take notes and track progress. See membership · Sign in

What you'll build

An EC2 Auto Scaling group for background workers with a launch template that uses an SSM-managed AMI path, enforces IMDSv2 (Instance Metadata Service v2), and assigns an instance profile for SSM Session Manager instead of opening port 22. A scheduled scaling action in nonprod scales the group to zero outside business hours.

Premium course

Keep reading with a membership

The rest of this lesson, its practice questions and the whole Terraform on AWS: Nonprod and Production Environments course are part of the membership.

See plans Sign in

Open in the app to mark lessons complete, take notes and track your progress.

Last reviewed · By the ByteCamel team · How we write content

Was this page helpful?

Report a mistake