HTTPSConnectionPool(host='s3-us-west-1b.amazonaws.com', port=443): Max retries exceeded with url

a 夏天 提交于 2019-12-07 16:13:35

问题


I am trying to copy a file from my aws ec2 instance to S3 bucket folder, but i am getting error

Here is the command sample aws s3 cp /home/abc/icon.jpg s3://mybucket/myfolder

This the error i am getting

upload failed: ./icon.jpg to s3://mybucket/myfolder/icon.jpg HTTPSConnectionPool(host='s3-us-west-1b.amazonaws.com', port=443): Max retries exceeded with url: /mybucket/myfolder/icon.jpg (Caused by : [Errno -2] Name or service not known)

I have already configured the config file for aws cli command line

Please suggest the solution to this problem


回答1:


You aren't using a valid endpoint.

s3-us-west-1b.amazonaws.com isn't valid.

S3 endpoints are at the regional level, not the availability zone level.

You're probably looking for s3-us-west-1.amazonaws.com.

http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region




回答2:


The issue is you have to use just region which you can see from aws console url there you can find region in url just copy it and use which is your region

Availability Zone is different which use have used earlier

Availability zone is followed by region along with region a, region b

availability zone status




回答3:


One possible issue could be that proxy might not have been set in your instance service role. Configure the env to point to your proxy servers via HTTP_PROXY / HTTPS_PROXY (Since the above error displays 443, it should be HTTPS_PROXY).



来源:https://stackoverflow.com/questions/24487444/httpsconnectionpoolhost-s3-us-west-1b-amazonaws-com-port-443-max-retries-e

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!