Launching an EC2 Instance

Launching an EC2 Instance

In the previous chapter, you learnt the CloudFormation fundamentals and about various Template sections.

You have created an EC2 instance with Elastic IP. This is a simplistic scenario.

In this chapter you will improve the existing template with the following features:

  • Use Systems Manager Parameter Store to deploy the latest Amazon Linux 2 AMI in any region.
  • Attach an IAM role to the instance and login to it using SSM Session Manager.
  • Bootstrap the instance using a UserData script.
  • Use cfn-init to assist bootstrapping an EC2 instance.