Module 14 - CloudFormation

Lab 1: Create an S3 Bucket Using CloudFormation

  • How do you write a CloudFormation template that creates an S3 bucket with a unique name?

  • How do you add tags to the S3 bucket?

  • How do you deploy the CloudFormation stack using the AWS Console or CLI?

  • How do you verify the bucket in the AWS Console?


Lab 2: Create an EC2 Instance with CloudFormation

  • How do you create a CloudFormation template using AWS::EC2::Instance?

  • How do you specify:

    • InstanceType (t2.micro)

    • AMI ID

    • KeyName parameter

  • How do you deploy the stack?

  • How do you SSH into the created EC2 instance?


Lab 3: Use CloudFormation Parameters

  • How do you add CloudFormation parameters for:

    • InstanceType

    • KeyName

  • How do you reference these parameters inside resources?

  • How do you provide parameter values during stack creation?


Lab 4: Add Outputs to an EC2 Template

  • How do you add CloudFormation outputs for:

    • EC2 Instance Public IP

    • Availability Zone

  • How do you view stack outputs after deployment?


Lab 5: Create a Security Group Using CloudFormation

  • How do you write a template that creates a security group?

  • How do you allow inbound SSH (port 22)?

  • How do you allow all outbound traffic?

  • How do you attach the security group to an EC2 instance?


Lab 6: Create an IAM Role Using CloudFormation

  • How do you create an IAM role with an EC2 trust policy?

  • How do you attach permissions that allow access to S3?

  • How do you attach the IAM role to an EC2 instance using CloudFormation?

  • How do you validate the IAM role and policies?


Lab 7: Use UserData to Install Nginx on EC2

  • How do you add a UserData script in CloudFormation to install Nginx during EC2 launch?

  • How do you access the EC2 instance public IP to verify Nginx is running?


Lab 8: Validate and Delete Stacks Using AWS CLI

  • How do you validate a CloudFormation template using the AWS CLI?

  • How do you deploy a stack using the CLI?

  • How do you delete a CloudFormation stack from the CLI?


Lab 9: Use CloudFormation Designer

  • How do you open and use CloudFormation Designer?

  • How do you drag and drop EC2 + VPC components?

  • How do you generate YAML automatically from the designer?

  • How do you deploy the generated template?


Lab 10: Create a Basic VPC Using CloudFormation

  • How do you write a CloudFormation template that creates:

    • A VPC

    • An Internet Gateway

    • A public subnet

    • A route table

    • A route to the internet

    • An EC2 instance inside the public subnet

  • How do you deploy and verify the VPC setup?

Last updated