When researching ways to generate a new inventory of an S3 Glacier vault we came across the AWS documentation here https://aws.amazon.com/premiumsupport/knowledge-center/cli-glacier-vault/ which provides the initiate-job command and the argument --job-parameters '{"Type": "inventory-retrieval"}'. The full command to list a vaults contents would then be:
aws glacier initiate-job --account-id - --vault-name yourvault --job-parameters '{"Type": "inventory-retrieval"}'
Unfortunately this command returns the error Unknown options: inventory-retrieval}'
To correct this error enter the command as shown below (command syntax taken from job-parameter command reference here : https://docs.aws.amazon.com/sdk-for-ruby/v2/api/Aws/Glacier/Types/JobParameters.html#type-instance_method
aws glacier initiate-job --account-id - --vault-name yourvault --job-parameters "{ \"Type\": \"inventory-retrieval\" }"
You should get output listing job location and job ID. The job will likely take several hours to complete.
Comments