

# Update Amazon EBS snapshot lock settings
<a name="update-snapshot-lock"></a>

The allowed updates depend on the lock state:
+ `governance` — you can change the lock mode and increase or decrease the lock duration or expiration date.
+ `compliance-cooloff` — you can change the lock mode, increase or decrease the cooling-off period, and increase or decrease the lock duration or expiration date.
+ `compliance` — you can only increase the lock duration or expiration date.

------
#### [ Console ]

**To update snapshot lock settings**

1. Open the Amazon EC2 console at [https://console.aws.amazon.com/ec2/](https://console.aws.amazon.com/ec2/).

1. In the navigation pane, choose **Snapshots**.

1. Select the snapshot for which to modify the lock settings and choose **Actions**, **Snapshot settings**, **Manage snapshot lock**.

1. Update the settings as needed, and then choose **Save lock settings**.

------
#### [ AWS CLI ]

**To update snapshot lock settings**  
Use the [lock-snapshot](https://docs.aws.amazon.com/cli/latest/reference/ec2/lock-snapshot.html) command. Specify the ID of the snapshot and the options to modify. The following example changes the expiration date.

```
aws ec2 lock-snapshot \
    --snapshot-id snap-0abcdef1234567890 \
    --lock-mode governance \
    --expiration-date YYYY-MM-DDThh:mm:ss.sssZ
```

------
#### [ PowerShell ]

**To update snapshot lock settings**  
Use the [Lock-EC2Snapshot](https://docs.aws.amazon.com/powershell/latest/reference/items/Lock-EC2Snapshot.html) cmdlet. Specify the ID of the snapshot and the options to modify. The following example changes the expiration date.

```
Lock-EC2Snapshot `
    -SnapshoId snap-0abcdef1234567890 `
    -LockMode "governance" `
    -ExpirationDate YYYY-MM-DDThh:mm:ss.sssZ
```

------