Retrieving Vault Metadata in Amazon S3 Glacier Using the Amazon Command Line Interface
This example shows how to retrieve vault information and metadata in Amazon S3 Glacier (S3 Glacier) using the Amazon Command Line Interface (Amazon CLI).
Topics
(Prerequisite) Setting Up the Amazon CLI
-
Download and configure the Amazon CLI. For instructions, see the following topics in the Amazon Command Line Interface User Guide:
-
Verify your Amazon CLI setup by entering the following commands at the command prompt. These commands don't provide credentials explicitly, so the credentials of the default profile are used.
-
Try using the help command.
aws help
-
To get a list of S3 Glacier vaults on the configured account, use the
list-vaults
command. Replace123456789012
with your Amazon Web Services account ID.aws glacier list-vaults --account-id
123456789012
-
To see the current configuration data for the Amazon CLI, use the
aws configure list
command.aws configure list
-
Example: Retrieving Vault Metadata Using the Amazon CLI
-
Use the
describe-vault
command to describe a vault namedawsexamplevault
under account111122223333
.aws glacier describe-vault --vault-name
awsexamplevault
--account-id111122223333