Amazon Elastic Compute Cloud
User Guide (API Version 2013-02-01)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.Did 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

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.

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:

    Important

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

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

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

    The console modifies permissions for the snapshot.

Command Line Interface

To modify snapshot permissions

  1. Use the ec2-describe-snapshot-attribute 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.

    Important

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

    • To make the snapshot public, use the ec2-modify-snapshot-attribute command as follows.

      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, use the ec2-modify-snapshot-attribute command as follows

      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. Use the DescribeSnapshotAttribute action to describe the snapshot's permissions. Construct the following request.

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

    The following is an example response.

    <DescribeSnapshotAttributeResponse xmlns="http://ec2.amazonaws.com/doc/2013-02-01/">
      <requestId>d0d21738-e3da-4077-947d-c9e48472d831</requestId>
      <snapshotId>snap-05b4aa6c</snapshotId>
      <createVolumePermission/>
    </DescribeSnapshotAttributeResponse>
  2. Choose whether to make the snapshot public, or to share it with a specific AWS account.

    Important

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

    • To make the snapshot public, use the ModifySnapshotAttribute action. Construct the following request.

      https://ec2.amazonaws.com/
      ?Action=ModifySnapshotAttribute
      &SnapshotId=snapshot-id
      &CreateVolumePermission.Add.1.Group=all
      &AUTHPARAMS
    • To share the snapshot with a particular AWS account, use the ModifySnapshotAttribute action as follows.

      https://ec2.amazonaws.com/
      ?Action=ModifySnapshotAttribute
      &SnapshotId=snapshot-id
      &CreateVolumePermission.Add.1.UserId=111122223333
      &AUTHPARAMS