Automated Deployment of an EC2 Instance with the Latest AWS Linux AMI

ACM.88 Automatically look up latest AWS Linux AMI and use it to Deploy an instance in a VPC with CloudFormation

Teri Radichel
Cloud Security

--

Part of my series on Automating Cybersecurity Metrics. The Code.

Free Content on Jobs in Cybersecurity | Sign up for the Email List

In the last post, I wrote about strategies to ensure your resources deploy properly in production by properly testing all affected code paths.

Now we’re going to write some code to obtain the most up-to-date Linux AMI and use it to deploy an EC2 instance with CloudFormation.

An SSH Key for our EC2 instance

We already spent a few posts considering ways to authenticate and log into an EC2 instance and for now, we will use an SSH key. You can follow along with how that key got created and stored in a Secrets Manager secret accessible to one user only starting here (there are multiple posts on the topic):

--

--

Teri Radichel
Cloud Security

CEO 2nd Sight Lab | Penetration Testing & Assessments | AWS Hero | Masters of Infosec & Software Engineering | GSE 240 etc | IANS | SANS Difference Makers Award