Update Amazon EBS snapshot lock settings
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
-
Open the Amazon EC2 console at
https://eusc-de-east-1.console.amazonaws-eusc.eu/ec2/.
-
In the navigation pane, choose Snapshots.
-
Select the snapshot for which to modify the lock settings and choose
Actions, Snapshot settings,
Manage snapshot lock.
-
Update the settings as needed, and then choose Save lock
settings.
- AWS CLI
-
To update snapshot lock settings
Use the lock-snapshot
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 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