Search code examples
aws-cliamazon-glacier

Can't access Glacier using AWS CLI


I'm trying to access AWS Glacier (from the command line on Ubuntu 14.04) using something like:

aws glacier list-vaults -

rather than

aws glacier list-vaults --account-id 123456789

The documentation suggests that this should be possible:

You can specify either the AWS Account ID or optionally a '-', in which case Amazon Glacier uses the AWS Account ID associated with the credentials used to sign the request.

Unless "credentials used to sign the request" means that I have to explicitly include credentials in the command, rather than rely on my .aws/credentials file, I would expect this to work. Instead, I get:

aws: error: argument --account-id is required

Does anyone have any idea how to solve this?


Solution

  • The - is supposed to be passed as the value of --account-id, so like

    aws glacier list-vaults --account-id -
    

    --account-id is in fact a required option.