|« PreviousNext »|
|Did this page help you? Yes | No | Tell us about it...|
You can share an AMI with specific AWS accounts without making the AMI public. All you need are the AWS account IDs.
To grant explicit launch permissions using the console
Open the Amazon EC2 console.
In the navigation pane, click AMIs.
Select your AMI in the list, and then select Modify Image Permissions from the Actions list.
Specify the AWS account number of the user with whom you want to share the AMI in the AWS Account Number field, then click Add Permission.
To share this AMI with multiple users, repeat the above step until you have added all the required users.
To allow create volume permissions for snapshots, check Add "create volume" permissions to the following associated snapshots when creating permissions.
You do not need to share the Amazon EBS snapshots than an AMI references in order to share the AMI. Only the AMI itself needs to be shared; the system automatically provides the instance access to the referenced Amazon EBS snapshots for the launch.
Click Save when you are done.
Use the ec2-modify-image-attribute command to share an AMI as shown in the following examples.
To grant explicit launch permissions using the CLI
The following command grants launch permissions for the specified AMI to the specified AWS account.
ec2-modify-image-attributelaunchPermission ami-2bb65342 ADD userId 111122223333
To remove launch permissions for an account
The following command removes launch permissions for the specified AMI from the specified AWS account:
ec2-modify-image-attributelaunchPermission ami-2bb65342 REMOVE userId 111122223333
To remove all launch permissions
The following command removes all public and explicit launch permissions from the specified AMI. Note that the owner of the AMI always has launch permissions and is therefore unaffected by this command.
ec2-reset-image-attributelaunchPermission ami-2bb65342 RESET