AWS CLI - couldn t connect to endpoint URL

+1 vote
$ aws s3 ls

Could not connect to the endpoint URL: "https://s3.us-east-1a.amazonaws.com/"

What could be the problem?

Oct 5, 2018 in AWS by datageek
• 2,540 points
34,360 views

4 answers to this question.

+1 vote
Best answer

You probably have something wrong in your default profile for the default region.

Check your file at ~/.aws/config, you have something like

[default] region=us-east-1a ...

Fix the region to region=us-east-1 and then the command will work correctly

 

answered Oct 5, 2018 by Archana
• 4,170 points

selected May 27, 2019 by Kalgi
yes changed the region to us-east-1 from default region. Its working now. But not sure why it is not working with default region
region named us-east-1a is not a valid endpoint. The valid endpoint is us-east-1.
It works  for me and you are correct
Thanks alot it worked
Thanks It is work  and you are correct
+1 vote

Valid endpoint names for this region:

  • s3.amazonaws.com

  • s3.us-east-1.amazonaws.com

  • s3-external-1.amazonaws.com

  • s3.dualstack.us-east-1.amazonaws.com**

  • account-id.s3-control.us-east-1.amazonaws.com

  • account-id.s3-control.dualstack.us-east-1.amazonaws.com**

answered Apr 8, 2019 by anonymous
Thanks, that was helpful.
+1 vote

I am using AWS Powershell and was recieving same error. When I logged into powershell to use the list s3 buckets command I kept getting

$ aws s3 ls
"Could not connect to the endpoint URL: "https://s3.us-east-1a.amazonaws.com/"

I made a few AWS default profiles within C:\Users\USERNAME\.aws  Credentials file. From what I have gathered you are able to login and switch user profiles while in the same windows powershell session. Let's say for example in my credentials file I have 3 different profiles: test, test2, and account3

[default]
aws_access_key_id =
aws_secret_access_key =

[test]
aws_access_key_id =
aws_secret_access_key =

[test2]
aws_access_key_id =
aws_secret_access_key =

[account3]
aws_access_key_id =
aws_secret_access_key =

It seems you must specify the user profile in your command, since you have multiple profies setup in the credentials. Try adding your profile --profile 

$ aws s3 ls --profile test
$ aws s3 ls --profile test1
$ aws s3 ls --profile account3

Get an in-depth understanding from the AWS Course in Bangalore.

answered May 26, 2019 by jgentsch11
Hi @jgentsch, I didn't know this feature was available. Using s3 buckets from different profiles is pretty cool and might be very useful for people. I had the same error but was solved using @Archana's answer. I did not use multiple profiles. Shall try it sometime though. Thank:)
+1 vote
I too had same issue but I was providing IAM user credential and that user didn,t had any permission,so I attached permission of full access and then it is working for me
answered Jul 23, 2019 by Archana
Hey @Archana, did you give full console and programmatic access?
yes that i have given,but here I am mentioning IAM policy so that IAM user can able to access resources.
Thanks for the response. I have given the FullAccess. Still stuck with the same error.

Related Questions In AWS

+1 vote
3 answers

How to get ARN for s3 Bucket using aws cli .

An ARN is a non-opaque, constructible identifier, ...READ MORE

answered Aug 16, 2018 in AWS by Priyaj
• 58,020 points
5,645 views
0 votes
1 answer

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

Via "Secure Token Service" using the following ...READ MORE

answered Jul 12, 2018 in AWS by Priyaj
• 58,020 points
1,795 views
0 votes
1 answer
0 votes
1 answer

AWS S3 uploading hidden files by default

versioning is enabled in your bucket. docs.aws.amazon.com/AmazonS3/latest/user-guide/….... the ...READ MORE

answered Oct 4, 2018 in AWS by Priyaj
• 58,020 points
5,958 views
–1 vote
1 answer

How to decrypt the encrypted S3 file using aws-encryption-cli --decrypt

Use command : aws s3 presign s3://mybucket/abc_count.png you get ...READ MORE

answered Oct 22, 2018 in AWS by Priyaj
• 58,020 points
5,204 views
0 votes
2 answers
0 votes
1 answer
0 votes
1 answer

AWS S3 CLI : error while trying to copy files locally using terminal

For the first error you should add ...READ MORE

answered Aug 3, 2018 in AWS by Archana
• 4,170 points
11,405 views
0 votes
1 answer

How to download the latest file in a S3 bucket using AWS CLI?

You can use the below command $ aws ...READ MORE

answered Sep 6, 2018 in AWS by Archana
• 4,170 points
19,855 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP