You can do this in 2 steps:
- you need to take a snapshot of your volume
- you can create AMI from given pictures
You can see all the ecsta salt shell commands at https://docs.saltstack.com/en/latest/ref/clouds/all/salt.cloud.clouds.ec2.html
create 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 AMI: register_image
This command creates the s from the 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
source share