Creating a Vault in Amazon S3 Glacier Using the Amazon Command Line Interface - Amazon S3 Glacier
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).

Creating a Vault in Amazon S3 Glacier Using the Amazon Command Line Interface

Follow these steps to create a vault in Amazon S3 Glacier (S3 Glacier) using the Amazon Command Line Interface (Amazon CLI).

(Prerequisite) Setting Up the Amazon CLI

  1. Download and configure the Amazon CLI. For instructions, see the following topics in the Amazon Command Line Interface User Guide:

    Installing the Amazon Command Line Interface

    Configuring the Amazon Command Line Interface

  2. 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. Replace 123456789012 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: Creating a Vault Using the Amazon CLI

  1. Use the create-vault command to create a vault named awsexamplevault under account 111122223333.

    aws glacier create-vault --vault-name awsexamplevault --account-id 111122223333

    Expected output:

    { "location": "/111122223333/vaults/awsexamplevault" }
  2. Verify creation using the describe-vault command.

    aws glacier describe-vault --vault-name awsexamplevault --account-id 111122223333