0

I am trying to download multiple files from S3 using aws cli in python. Using pip install I installed aws cli and was able to successfully pass credentials. But when I try to download multiple files, I get following error: fatal error: invalid literal for int() with base 10: 'us-east-1.amazonaws.com'

My code to download the file looks like this: aws s3 cp "s3://buckets/testtelligence/saurav_shekhar/test/" "C:/HD/Profile data/Downloads" --recursive

Also, my C:\Users\USERNAME\.aws\config is

[default] region = Default region name [None]:us-east-1 output = Default output format [None]: table

I am not sure what that error means and how to resolve this.

5
  • Does the CLI work at all? For example, can you do aws s3 ls? Does it work when trying to copy one file (without --recursive)? Commented Jun 26, 2018 at 0:52
  • No. It gives me the same error. Does that mean that CLI is not working? If yes then any possible resolution. Commented Jun 26, 2018 at 1:15
  • It sounds like your CLI configuration isn't correct. Please edit your question to show the contents of C:\Users\USERNAME\.aws\config. It should show region=us-east-1 under [default]. See: Configuring the AWS CLI - AWS Command Line Interface Commented Jun 26, 2018 at 1:53
  • I have edited the question and have added the content of C:\Users\USERNAME\.aws\config Commented Jun 26, 2018 at 2:06
  • No, that should not be the contents. Please delete that file and run aws configure. It will format the file correctly. Commented Jun 26, 2018 at 2:30

1 Answer 1

1

The contents of your .aws/config file should look like:

[default]
region = us-east-1
output = table
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.