Ben Harold
Ben Harold

Reputation: 6432

What's wrong with my AWS CLI configuration?

I'm attempting to use the AWS CLI tool to upload a file to Amazon Glacier. I installed awscli using pip:

sudo pip install awscli

I created a new AWS IAM group example with AmazonGlacierFullAccess permissions.

I created a new AWS IAM user example and added the user to the example group. I also created a new access key for the user.

I created a new AWS Glacier Vault example and edited the policy document to allow the example user to allow actions glacier:* with no conditions.

I then ran aws configure and added the "Access Key ID" and "Secret Access Key" as well as the default region.

When I run:

aws glacier list-vaults

I get the error:

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

If I add the account ID:

aws --account-id=[example user account ID] glacier list-vaults

I get this error:

A client error (UnrecognizedClientException) occurred when calling the ListVaults operation: No account found for the given parameters

I figured I might have gotten something in the group assignment wrong, so I added the AdministratorAccess policy directly to the example user. Now I can run commands such as aws s3 ls, but I still cannot aws glacier list-vaults without getting the aws: error: argument --account-id is required error.

Have I missed something in my AWS configuration? How can I further troubleshoot this issue?

Upvotes: 4

Views: 1676

Answers (1)

helloV
helloV

Reputation: 52375

Looks like for AWS Glacier you need the account ID List Vaults (GET vaults)

You can get your account id (12 digits) from Support page - Top right on your AWS dashboard.

Upvotes: 6

Related Questions