Enable block public access for snapshots - Amazon EBS

Enable block public access for snapshots

Use the following procedures to configure and monitor block public access for snapshots.

Configure block public access for snapshots

Enable block public access for snapshots to prevent the public sharing of snapshots in the Region. After this feature is enabled, requests to publicly share snapshots in the Region are blocked.

Important

If block public access for snapshots is enabled in block all sharing mode, and you change the mode to block new sharing, all snapshots that were previously publicly shared are no longer treated as private and they become publicly accessible again.

Console
To configure block public access for snapshots
  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. In the navigation pane, choose EC2 Dashboard, and then in Account attributes (on the right-hand side), choose Data protection and security.

  3. In the Block public access for EBS snapshots section, choose Manage.

  4. Select Block public access and then choose one of the following options:

    • Block all public access — To block all public sharing of your snapshots. Users in the account can't request new public sharing. Additionally, snapshots that were already publicly shared are treated as private and are no longer publicly available.

    • Block new public sharing — To block only new public sharing of your snapshots. Users in the account can't request new public sharing. However, snapshots that were already publicly shared, remain publicly available.

  5. Choose Update.

AWS CLI
To enable or modify block public access for snapshots

Use the enable-snapshot-block-public-access command. For --state specify one of the following values:

  • block-all-sharing — To block all public sharing of your snapshots. Users in the account can't request new public sharing. Additionally, snapshots that were already publicly shared are treated as private and are no longer publicly available.

  • block-new-sharing — To block only new public sharing of your snapshots. Users in the account can't request new public sharing. However, snapshots that were already publicly shared, remain publicly available.

aws ec2 enable-snapshot-block-public-access --state block-all-sharing|block-new-sharing

View the setting for block public access for snapshots

Block public access can be in one of the following states for each Region in your account.

  • Block all sharing — All public sharing of your snapshots is blocked. Users in the account can't request new public sharing. Additionally, snapshots that were already publicly shared are treated as private and are not publicly available.

  • Block new sharing — Only new public sharing of your snapshots is blocked. Users in the account can't request new public sharing. However, snapshots that were already publicly shared, remain publicly available.

  • Unblocked — Public sharing is not blocked. Users can publicly share snapshots.

Console
To view the setting for block public access for snapshots
  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. In the navigation pane, choose EC2 Dashboard, and then in Account attributes (on the right-hand side), choose Data protection and security.

  3. The Block public access for EBS snapshots section shows the current setting.

AWS CLI
To view the setting for block public access for snapshots

Use the get-snapshot-block-public-access-state command.

aws ec2 get-snapshot-block-public-access-state

Disable block public access for snapshots

Disable block public access for snapshots to allow public sharing of snapshots in the Region. After this feature is disabled, users can publicly share snapshots in the Region.

Important

If block public access for snapshots is enabled in block all sharing mode, and you disable block public access, all snapshots that were previously publicly shared are no longer treated as private and they become publicly accessible again.

Console
To disable block public access for snapshots
  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. In the navigation pane, choose EC2 Dashboard, and then in Account attributes (on the right-hand side), choose Data protection and security.

  3. In the Block public access for EBS snapshots section, choose Manage.

  4. Clear Block public access and choose Update.

AWS CLI
To disable block public access for snapshots

Use the disable-snapshot-block-public-access command.

aws ec2 disable-snapshot-block-public-access