Skip to content

Simple SSM Automation document to remove ephemeral block device mappings by re-baking given AMI.

Notifications You must be signed in to change notification settings

sshvetsov/ssm-ubuntu-rebake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Rebuild AMI using SSM Automation

This Automation document demonstrates how to remove ephemeral block device mappings from source AMI by creating a new AMI in your AWS account.

For detailed post see: http://blog.shvetsov.com/2017/04/rebuild-ami-using-ssm-automation.html

For this example to work you will need to:

aws ssm \
create-document \
--name "TVLK-ami-sans-bdm" \
--content "file://TVLK-ami-sans-bdm.json" \
--document-type "Automation"
  • execute automation, but replace fake AutomationAssumeRole, SubnetId and SourceAmiId values with real parameters:
aws ssm \
start-automation-execution \
--document-name "TVLK-ami-sans-bdm" \
--parameters \
"AutomationAssumeRole=arn:aws:iam::123456789012:role/YourAutomationRole,SubnetId=subnet-12345678,SourceAmiId=ami-XXXXXX"

About

Simple SSM Automation document to remove ephemeral block device mappings by re-baking given AMI.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published