Is it possible to share an AMI using AWS SDK? I know I can share AMI images using AWS console or CLI as described in http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sharingamis-explicit.html . I searched through the AWS documentation but I have not been able to find any documentation/examples that let you share AMIs using AWS SDK. Is it possible at all?
EDIT: Also, is it possible to share AMI images to other IAM users?
Absolutely. For example look at the boto.ec2.image class. (The python sdk)
http://boto.readthedocs.org/en/latest/ref/ec2.html#module-boto.ec2.image
I'm sure the ruby, js and java SDKs can do it too as they all use the AWS API.
As a matter of fact the cli also uses the API.
Also here's for example the EC2 API reference on how to create an image.
http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-CreateImage.html
And yes you can share AMIs with other users depending on the AIM policies on the users.