Table Of Contents


User Guide

First time using the AWS CLI? See the User Guide for help getting started.

[ aws . glacier ]



This operation initiates a job of the specified type, which can be a select, an archival retrieval, or a vault retrieval. For more information about using this operation, see the documentation for the underlying REST API Initiate a Job .

See also: AWS API Documentation


--account-id <value>
--vault-name <value>
[--job-parameters <value>]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]


--account-id (string)

The AccountId value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single '- ' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens ('-') in the ID.

--vault-name (string)

The name of the vault.

--job-parameters (structure)

Provides options for specifying job information.

JSON Syntax:

  "Format": "string",
  "Type": "string",
  "ArchiveId": "string",
  "Description": "string",
  "SNSTopic": "string",
  "RetrievalByteRange": "string",
  "Tier": "string",
  "InventoryRetrievalParameters": {
    "StartDate": "string",
    "EndDate": "string",
    "Limit": "string",
    "Marker": "string"
  "SelectParameters": {
    "InputSerialization": {
      "csv": {
        "FileHeaderInfo": "USE"|"IGNORE"|"NONE",
        "Comments": "string",
        "QuoteEscapeCharacter": "string",
        "RecordDelimiter": "string",
        "FieldDelimiter": "string",
        "QuoteCharacter": "string"
    "ExpressionType": "SQL",
    "Expression": "string",
    "OutputSerialization": {
      "csv": {
        "QuoteFields": "ALWAYS"|"ASNEEDED",
        "QuoteEscapeCharacter": "string",
        "RecordDelimiter": "string",
        "FieldDelimiter": "string",
        "QuoteCharacter": "string"
  "OutputLocation": {
    "S3": {
      "BucketName": "string",
      "Prefix": "string",
      "Encryption": {
        "EncryptionType": "aws:kms"|"AES256",
        "KMSKeyId": "string",
        "KMSContext": "string"
      "CannedACL": "private"|"public-read"|"public-read-write"|"aws-exec-read"|"authenticated-read"|"bucket-owner-read"|"bucket-owner-full-control",
      "AccessControlList": [
          "Grantee": {
            "Type": "AmazonCustomerByEmail"|"CanonicalUser"|"Group",
            "DisplayName": "string",
            "URI": "string",
            "ID": "string",
            "EmailAddress": "string"
          "Permission": "FULL_CONTROL"|"WRITE"|"WRITE_ACP"|"READ"|"READ_ACP"
      "Tagging": {"string": "string"
      "UserMetadata": {"string": "string"

--cli-input-json (string) Performs service operation based on the JSON account-id provided. The JSON account-id follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.


The following command initiates a job to get an inventory of the vault my-vault:

aws glacier initiate-job --account-id - --vault-name my-vault --job-parameters '{"Type": "inventory-retrieval"}'


    "location": "/0123456789012/vaults/my-vault/jobs/zbxcm3Z_3z5UkoroF7SuZKrxgGoDc3RloGduS7Eg-RO47Yc6FxsdGBgf_Q2DK5Ejh18CnTS5XW4_XqlNHS61dsO4CnMW",
    "jobId": "zbxcm3Z_3z5UkoroF7SuZKrxgGoDc3RloGduS7Eg-RO47Yc6FxsdGBgf_Q2DK5Ejh18CnTS5XW4_XqlNHS61dsO4CnMW"

Amazon Glacier requires an account ID argument when performing operations, but you can use a hyphen to specify the in-use account.

The following command initiates a job to retrieve an archive from the vault my-vault:

aws glacier initiate-job --account-id - --vault-name my-vault --job-parameters file://job-archive-retrieval.json

job-archive-retrieval.json is a JSON file in the local folder that specifies the type of job, archive ID, and some optional parameters:

  "Type": "archive-retrieval",
  "ArchiveId": "kKB7ymWJVpPSwhGP6ycSOAekp9ZYe_--zM_mw6k76ZFGEIWQX-ybtRDvc2VkPSDtfKmQrj0IRQLSGsNuDp-AJVlu2ccmDSyDUmZwKbwbpAdGATGDiB3hHO0bjbGehXTcApVud_wyDw",
  "Description": "Retrieve archive on 2015-07-17",
  "SNSTopic": "arn:aws:sns:us-west-2:0123456789012:my-topic"

Archive IDs are available in the output of aws glacier upload-archive and aws glacier get-job-output.


    "location": "/011685312445/vaults/mwunderl/jobs/l7IL5-EkXyEY9Ws95fClzIbk2O5uLYaFdAYOi-azsX_Z8V6NH4yERHzars8wTKYQMX6nBDI9cMNHzyZJO59-8N9aHWav",
    "jobId": "l7IL5-EkXy2O5uLYaFdAYOiEY9Ws95fClzIbk-azsX_Z8V6NH4yERHzars8wTKYQMX6nBDI9cMNHzyZJO59-8N9aHWav"

See Initiate Job in the Amazon Glacier API Reference for details on the job parameters format.


location -> (string)

The relative URI path of the job.

jobId -> (string)

The ID of the job.

jobOutputPath -> (string)

The path to the location of where the select results are stored.