Amazon Elastic Compute Cloud
User Guide (API Version 2012-04-01)
Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to DiggDid this page help you?  Yes  No   Tell us about it...

Modifying Snapshot Permissions

This section describes how to modify permissions for your snapshots so that specific AWS accounts or all Amazon EC2 users can create volumes from them.

[Important]Important

When you share a snapshot (whether by sharing it with another AWS account or making it public to all), you are giving others access to all the data on your snapshot. Share snapshots only with people with whom you want to share all your snapshot data. Snapshots with AWS Marketplace product codes cannot be made public

For an overview of the AWS Marketplace, go to https://aws.amazon.com/marketplace/help/200900000. For details on how to use the AWS Marketplace, see AWS Marketplace.

AWS Management Console

To modify snapshot permissions

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. Click Snapshots in the Navigation pane.

    The console displays a list of current snapshots and their status.

  3. Select a snapshot and click Permissions.

    The Modify Snapshot Permissions dialog box appears.

  4. Choose whether to make the snapshot public or to share it with select AWS accounts:

    • To make the snapshot public, select Public and click Save.

      [Important]Important

      This shares all the data on your snapshot with everyone. Snapshots with AWS Marketplace product codes cannot be made public.

    • To only expose the snapshot to specific AWS accounts, select Private, enter the IDs of the accounts you want to share with, and click Save.

    The console modifies permissions for the snapshot.

Command Line Tools

To modify snapshot permissions

  1. Enter the following command to first describe the snapshot's permissions.

    PROMPT>  ec2-describe-snapshot-attribute snap_id --create-volume-permission

    If there are no permissions set on the snapshot, the output is empty.

  2. Choose whether to make the snapshot public, or to share it with a specific AWS account:

    • To make the snapshot public, enter the following command.

      [Important]Important

      This command shares all the data on your snapshot with everyone. Snapshots with AWS Marketplace product codes cannot be made public.

      PROMPT>  ec2-modify-snapshot-attribute snap_id -c --add all

      Amazon EC2 returns permission information for the snapshot.

      createVolumePermission  snap_id   ADD     group   all
    • To share the snapshot with a particular AWS account, enter the following command.

      PROMPT>  ec2-modify-snapshot-attribute snap_id -c --add account_id

      Amazon EC2 returns permission information for the snapshot.

      createVolumePermission  snap_id   ADD     account_id

API

To modify snapshot permissions

  1. Construct the following Query request.

    https://ec2.amazonaws.com/
    ?Action=DescribeSnapshotAttribute
    &SnapshotId=snapshot-id
    &...auth parameters...
    

    Following is an example response.

    <DescribeSnapshotAttributeResponse xmlns="http://ec2.amazonaws.com/doc/2012-04-01/">
      <requestId>d0d21738-e3da-4077-947d-c9e48472d831</requestId>
       <snapshotId>snap-05b4aa6c</snapshotId>
       <createVolumePermission/>
    </DescribeSnapshotAttributeResponse>
  2. Construct the following Query request to make the snapshot public.

    [Important]Important

    This shares all the data on your snapshot with everyone. Snapshots with AWS Marketplace product codes cannot be made public.

    https://ec2.amazonaws.com/
    ?Action=ModifySnapshotAttribute
    &SnapshotId.1=snapshot-id
    &Add.1=all
    &...auth parameters...
    

    Following is an example response.

    <ModifySnapshotAttributeResponse xmlns="http://ec2.amazonaws.com/doc/2012-04-01/">
      <return>true</return>
    </ModifySnapshotAttributeResponse>