Open In App

How To Integrate EC2 Image Builder With AWS Services

EC2 means Elastic Compute Cloud. Ec2 and EC2 Image Builder are two different services given by AWS with different purposes. EC2 is used for running applications, hosting websites, processing data, and other computing operations in AWS, while EC2 Image Builder is used for creating custom Amazon Machine Images (AMIs) with specified configurations and settings for EC2 instances.

Detailed documentation of the EC2 Image Builder.



Integrating AWS services in EC2 Image Builder

These are some services available inside AWS that we can integrate while creating EC2 Image Builder:

Integrating EC2 Image Builder with Amazon Simple Notification Service (SNS)

Detailed documentation on the Amazon Simple Notification Service.



1. Setup email notifications through Amazon SNS

Step 1: Create a topic.

Step 2: Create a subscription for topic “ImageBuilderNotifications”.

2. Create an EC2 Image Builder

There will be a total of six steps to create an Image pipeline.

1. Step One is to Specify pipeline details.

2. Step Two is to Choose recipe.

3. Step Three is the Image creation process.

4. Step Four is to define the infrastructure configuration.

Create a new IAM role for EC2 Image Builder.

// JSON
// Replace "your-region" according to your need and give your "AWS your-account-id"

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "sns:Publish",
            "Resource": "arn:aws:sns:your-region:your-account-id:ImageBuilderNotifications" 
        }
    ]
}





5. Step Five is to define distribution settings.

6. Step Six is Review.

Result: Video demonstration of AMI creation

In this demonstration, we will see steps to perform after successfully creating the pipeline.

Conclusion

We successfully integrated an Amazon Simple Notification Service (SNS) with our EC2 Image Builder. We successfully created EC2 Image Builder mail on our given mail ID in JSON format with all logs.

Integrating EC2 Image Builder with AWS Services – FAQ’s

What’s the Amazon SNS?

Amazon Simple Notification Service( SNS) is a completely managed messaging service offered by AWS for transferring dispatches or cautions to multitudinous endpoints or subscribers.

What’s the EC2 Image Builder?

AWS offers EC2 Image Builder, a service that allows user to produce custom Amazon Machine Images( AMIs) with customized configurations and settings for users EC2 cases.

How do I integrate Amazon SNS and EC2 Image Builder?

You can combine Amazon SNS with EC2 Image Builder to get announcements about image product events, similar as successes or failures, allowing for immediate communication and action.

Which AWS services can be connected with EC2 Image Builder?

EC2 Image Builder supports integration with a number of AWS services, including AWS CloudTrail, Amazon CloudWatch Logs, Amazon EventBridge, Amazon Inspector, AWS Marketplace, and Amazon SNS.


Article Tags :