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.
You can do that in 2 steps:
You can see all saltstack ec2 commands at https://docs.saltstack.com/en/latest/ref/clouds/all/salt.cloud.clouds.ec2.html
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With