Use AWS Systems Manager Automation to Create EC2 AMI

Yst@IT
3 min readAug 2, 2019

--

Systems Manager Automation

A Systems Manager Automation document defines the actions that Systems Manager performs on your managed instances and AWS resources. Documents use JavaScript Object Notation (JSON) or YAML, and they include steps and parameters that you specify. Steps run in sequential order.

In order for Systems Manager to work on your instances, a AmazonEC2RoleforSSM role must be applied to the instance. Without this step, you won’t be able to see instances available to perform automation.

From Systems Manager menu, choose Automation then choose Execute Automation.

Systems Manager Automation

Choose the categories you want for automation. For this example we will choose AMI management and AWS-Createimage.

Systems Manager Automation

This is kinda like version control by the AWS, use the default value.

Systems Manager Automation

There are four options to run the automation, for this demo I will use Simple execution.

Systems Manager Automation

Enable Show Interactive Instance picker to pick instances easily. If you don’t have role applied properly, you won’t see instances here. If you don’t want your instance to reboot during AMI creation, type true in the NoReboot field, otherwise type false. Left AutomationAssumeRole empty, Automation will create one itself. Finally, click Execute.

Systems Manager Automation

Once executed, you would see that the automation is in progress.

Systems Manager Automation

Quickly switch to Snapshots page and AMI page to confirm that AMI creation is in progress!

Systems Manager Automation
Systems Manager Automation

Back to Automation to see that the status is success.

Systems Manager Automation

And finally a view of the automation list.

Systems Manager Automation

--

--

Yst@IT
Yst@IT

Written by Yst@IT

Cloud Solution Architect, focusing on Oracle Cloud Infrastructure currently.

No responses yet