| Server IP : 138.197.107.151 / Your IP : 216.73.216.170 Web Server : Apache/2.4.58 (Ubuntu) System : Linux BloxBy-Builder 6.8.0-71-generic #71-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22 16:52:38 UTC 2025 x86_64 User : wpbetasites_mrakzqskir ( 1022) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/bsd-crawler-parser/aws/dist/awscli/examples/glacier/ |
Upload File : |
**To initiate the vault locking process**
The following ``initiate-vault-lock`` example installs a vault lock policy on the specified vault and sets the lock state of the vault lock to ``InProgress``. You must complete the process by calling ``complete-vault-lock`` within 24 hours to set the state of the vault lock to ``Locked``. ::
aws glacier initiate-vault-lock \
--account-id - \
--vault-name MyVaultName \
--policy file://vault_lock_policy.json
Contents of ``vault_lock_policy.json``::
{"Policy":"{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Define-vault-lock\",\"Effect\":\"Deny\",\"Principal\":{\"AWS\":\"arn:aws:iam::999999999999:root\"},\"Action\":\"glacier:DeleteArchive\",\"Resource\":\"arn:aws:glacier:us-west-2:999999999999:vaults/examplevault\",\"Condition\":{\"NumericLessThanEquals\":{\"glacier:ArchiveAgeinDays\":\"365\"}}}]}"}
The output is the vault lock ID that you can use to complete the vault lock process. ::
{
"lockId": "9QZgEXAMPLEPhvL6xEXAMPLE"
}
For more information, see `Initiate Vault Lock (POST lock-policy) <https://docs.aws.amazon.com/amazonglacier/latest/dev/api-InitiateVaultLock.html>`__ in the *Amazon Glacier API Developer Guide*.