Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (12.7k points)

Has anybody tried creating AWS AMI(image) using saltstack.

I tried using it was able to create new instance from existing AMIs but how to create image using salt-cloud?

Also attempted by using boto_ec2 but its give error that Module 'boto_ec2' is not available.

1 Answer

0 votes
by (29.5k points)

Just follow the commands and it should do the trick

create the snapshots : create_snapshot

salt-cloud -f create_snapshot my-ec2-config volume_id=vol-351d8826
salt-cloud -f create_snapshot my-ec2-config volume_id=vol-351d8826 \
description="My Snapshot Description"
create the AMI : register_image

This command creates an ami from a snapshot

salt-cloud -f register_image my-ec2-config ami_name=my_ami \
description="my description" root_device_name=/dev/xvda snapshot_id=snap-xxxxxxxx

Browse Categories

...