Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions,
see Getting Started with Amazon Web Services in China
(PDF).
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://console.amazonaws.cn/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.
- Amazon 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
-DD
Thh
:mm
:ss
.sss
Z
- 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
-DD
Thh
:mm
:ss
.sss
Z