How to do it...

  1. Create a new CloudFormation template. Add the following Parameters to it:
      AmiId:         Type: AWS::EC2::Image::Id         Description: AMI ID to launch instances from         Default: ami-0b33d91d       VpcId:         Type: AWS::EC2::VPC::Id         Description: VPC where load balancer and instance will launch       SubnetIDs:         Type: List<AWS::EC2::Subnet::Id>         Description: Public subnet where the instance will launch          (pick at least 1)       KeyPair:         Type: AWS::EC2::KeyPair::KeyName         Description: Key to launch EC2 instance with       AlertEmail:         Type: String         Description: Email Address which alert emails will be sent to
  1. Now for the Resources, we need to define a Role and InstanceProfile for our EC2 instance. This will give our server the appropriate permissions to send ...

Get Implementing AWS: Design, Build, and Manage your Infrastructure now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.