Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Invalid endpoint on aws s3 ls

Tags:

aws-cli

I've just installed AWS Command Line Interface on Windows 10 (64-bit). I ran 'aws configure' providing the two keys, a region value of us-east-1, and took the default json format. Then when I run 'aws s3 ls' I get the following error:

Invalid endpoint: https://s3..amazonaws.com

It's either not taking my region, or putting two dots where there should be one in the link. My /.aws/config file only has these lines in it:

[default]

region = us-east-1

Any ideas why I get 2 dots in place of my region in the s3 link, causing the invalid endpoint error? Thanks for any assistance.

like image 244
scotto Avatar asked Mar 18 '18 21:03

scotto


2 Answers

You could also fix this by setting environment variables in your current session for AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_DEFAULT_REGION.

(in this case your error is actually caused by the CLI not finding a value for the region)

like image 131
user3399551 Avatar answered Sep 28 '22 11:09

user3399551


I think that's not because of the region because you have already set default to us-east-1 as shown by your /.aws/config file but your output type is not set and double check your access key id and secret access key

it should be like:

enter image description here

enter image description here

also check whether you are able to call other AWS API services such as try to create a dynamodb table using AWS CLI and check whether your IAM user have access permissions to s3 or not.

like image 28
Mausam Sharma Avatar answered Sep 28 '22 11:09

Mausam Sharma