To create an ec2 instance image using saltstack just follow the steps
you need to take a snapshot of your volume
you can create an AMI from a given snapshots
For commands of saltstack refer: https://docs.saltstack.com/en/latest/ref/clouds/all/salt.cloud.clouds.ec2.html
For creating snapshot follow the commands
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"
To create an AMI use this
create the AMI: register_image
salt-cloud -f register_image my-ec2-config ami_name=my_ami \
description="my description" root_device_name=/dev/xvda snapshot_id=snap-xxxxxxxx
Hope this will help to create ec2 instances using saltstack
If you need to automate this creation process
Refer: https://docs.saltstack.com/en/latest/ref/clients/#salt.cloud.CloudClient
And write a python script to automate this process of creating AMI in your servers.