Questions tagged [aws-cli]

The AWS Command Line Interface (CLI) is a unified tool to manage AWS services.

The AWS Command Line Interface (CLI) is a unified tool to manage AWS services. Multiple AWS services can be controlled via the command line and various actions can be automated through this tool.

Questions involving an alternate implementation for Windows PowerShell, AWS Tools for PowerShell, should be tagged with instead.

Resources

3275 questions
826
votes
31 answers

Downloading an entire S3 bucket?

I noticed that there doesn't seem to be an option to download an entire S3 bucket from the AWS Management Console. Is there an easy way to grab everything in one of my buckets? I was thinking about making the root folder public, using wget to grab…
rugbert
  • 9,753
  • 9
  • 35
  • 60
188
votes
2 answers

How to test credentials for AWS Command Line Tools

Is there a command/subcommand that can be passed to the aws utility that can 1) verify that the credentials in the ~/.aws/credentials file are valid, and 2) give some indication which user the credentials belong to? I'm looking for something generic…
smitelli
  • 5,234
  • 2
  • 25
  • 47
149
votes
13 answers

How to upgrade AWS CLI to the latest version?

I recently noticed that I am running an old version of AWS CLI that is lacking some functionality I need: $aws --version aws-cli/1.2.9 Python/3.4.3 Linux/3.13.0-85-generic How can I upgrade to the latest version of the AWS CLI…
Borealis
  • 6,553
  • 12
  • 58
  • 104
147
votes
8 answers

How to use multiple AWS accounts from the command line?

I've got two different apps that I am hosting (well the second one is about to go up) on Amazon EC2. How can I work with both accounts at the command line (Mac OS X) but keep the EC2 keys & certificates separate? Do I need to change my environment…
Matt Culbreth
  • 2,085
  • 2
  • 15
  • 17
139
votes
3 answers

How can I use wildcards to `cp` a group of files with the AWS CLI

I'm having trouble using * in the AWS CLI to select a subset of files from a certain bucket. Adding * to the path like this does not seem to work aws s3 cp s3://data/2016-08* .
meepl
  • 8,533
  • 16
  • 54
  • 88
129
votes
10 answers

AWS ECS Error when running task: No Container Instances were found in your cluster

Im trying to deploy a docker container image to AWS using ECS, but the EC2 instance is not being created. I have scoured the internet looking for an explanation as to why I'm receiving the following error: "A client error…
cosbor11
  • 9,704
  • 8
  • 43
  • 58
121
votes
13 answers

How to change User Status FORCE_CHANGE_PASSWORD?

Using AWS Cognito, I want to create dummy users for testing purposes. I then use the AWS Console to create such user, but the user has its status set to FORCE_CHANGE_PASSWORD. With that value, this user cannot be authenticated. Is there a way to…
Dominique Vial
  • 2,871
  • 2
  • 22
  • 42
121
votes
4 answers

Quick way to get AWS Account number from the AWS CLI tools?

Looking for a quick way to pull my account number, I had originally thought of using aws iam get-account-authorization-details --max-items 1 but there are several issues with doing it this way. Is there a way to do this that might not cross account…
ehime
  • 7,079
  • 8
  • 42
  • 101
118
votes
14 answers

AWS CLI $PATH Settings

I am following the AWS CLI Setup guide. I have managed to successfully install the tool on my Mac OS X terminal with the following output: Running cmd: /usr/bin/python virtualenv.py --python /usr/bin/python /Users/fr/.local/lib/aws Running cmd:…
fr_muses
  • 1,345
  • 2
  • 8
  • 10
101
votes
17 answers

Unable to select Custom SSL Certificate (stored in AWS IAM)

I am going to create a new distribution at CloudFront. Already I have uploaded my SSL certificate at AWS IAM using AWS CLI. That certificate appears in the Custom SSL Certificate dropdown on new distribution page but it is DISABLED. Can someone tell…
theGeekster
  • 5,421
  • 10
  • 31
  • 46
99
votes
5 answers

How to use AWS S3 CLI to dump files to stdout in BASH?

I'm starting a bash script which will take a path in S3 (as specified to the ls command) and dump the contents of all of the file objects to stdout. Essentially I'd like to replicate cat /path/to/files/* except for S3, e.g. s3cat…
Neil C. Obremski
  • 15,617
  • 20
  • 62
  • 90
93
votes
6 answers

Error "You must specify a region" when running any aws CLI command

I am trying to use aws container service as per the documentation in http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_GetStarted.html The below error is thrown when running the command: aws ecs list-container-instances --cluster…
user859375
  • 2,449
  • 3
  • 16
  • 21
92
votes
11 answers

AWS : The config profile (MyName) could not be found

Every time I want to config something with AWS I get the following error : "The config profile (myname) could not be found" like : aws configure I'm using Python 3.4 and I want to use AWS CLI Keyring to encrypt my credentials..
Steve Ritz
  • 1,387
  • 3
  • 9
  • 12
85
votes
20 answers

How can I resolve the error "The security token included in the request is invalid" when running aws iam upload-server-certificate?

I cd into the directory where all the pem/key files are and run the following: aws iam upload-server-certificate --server-certificate-name certificate_name --certificate-body file://webservercertificate.pem --private-key…
Killesk
  • 1,469
  • 2
  • 16
  • 27
81
votes
23 answers

The AWS Access Key Id does not exist in our records

I created a new Access Key and configured that in the AWS CLI with aws configure. It created the .ini file in ~/.aws/config. When I run aws s3 ls it gives: A client error (InvalidAccessKeyId) occurred when calling the ListBuckets operation: The AWS…
kaushikdr
  • 1,091
  • 1
  • 9
  • 17
1
2 3
99 100