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

4345 questions
1042
votes
38 answers

Downloading an entire S3 bucket?

I noticed that there does not 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
  • 11,603
  • 9
  • 39
  • 68
290
votes
3 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
  • 6,835
  • 3
  • 31
  • 53
220
votes
11 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,835
  • 2
  • 19
  • 17
216
votes
4 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* .
metersk
  • 11,803
  • 21
  • 63
  • 100
203
votes
34 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
  • 2,734
  • 3
  • 22
  • 29
201
votes
14 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
  • 3,729
  • 2
  • 25
  • 45
171
votes
18 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
  • 8,044
  • 17
  • 64
  • 112
166
votes
13 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
  • 14,709
  • 10
  • 54
  • 69
154
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
  • 8,025
  • 14
  • 51
  • 110
153
votes
7 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
  • 3,529
  • 5
  • 21
  • 22
141
votes
34 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,699
  • 2
  • 12
  • 18
141
votes
15 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
  • 2,017
  • 4
  • 12
  • 12
133
votes
34 answers

AWS CLI S3 A client error (403) occurred when calling the HeadObject operation: Forbidden

I'm trying to setup a Amazon Linux AMI(ami-f0091d91) and have a script that runs a copy command to copy from a S3 bucket. aws --debug s3 cp s3://aws-codedeploy-us-west-2/latest/codedeploy-agent.noarch.rpm . This script works perfectly on my local…
MojoJojo
  • 3,897
  • 4
  • 28
  • 54
133
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
  • 18,696
  • 24
  • 83
  • 112
130
votes
17 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,475
  • 2
  • 10
  • 10
1
2 3
99 100