DEV Community

loading...
This is Learning

Automate creation, validation of AWS AMI - EC2 Image Builder

Ajit Singh
Angular Collborator | Frontend Developer | Currently learning AWS
・1 min read

In the last article we studied AWS AMI how to create them so that we can easily get preconfigured EC2 instances. Lets now look at a new AWS service which allows us check if the AMI is created correctly and automate the whole process.

What is EC2 image builder?

EC2 image builder is an AWS service which allows us to build, maintain validate and test our AWS AMI. It is a free service and we only have to pay for the underlying storage and EC2 instances that this service uses.

How does EC2 image builder work?

  1. We setup our EC2 image builder.

  2. It creates an EC2 instance which builds everything we have defined like installing a firewall, adding python, adding java, nodejs etc

  3. It then creates an AMI from it.

  4. Then image builder create a test EC2 instance from this AMI and runs a bunch of tests that are defined by us.

  5. This leads to the final EC2 AMI image that we can use

  6. We can also schedule it of you keep on changing our software or update dependencies. It can be run weekly, daily as and when you want

As we can see that this service can help us a lot in building our AMI and make them secure by updating and testing them on dependency or software updates.

In the next article we will do a Hands on on EC2 image builder.

Discussion (0)