1

I'm using the aws cli (aws-cli/1.3.23 Python/2.7.5 Darwin/13.2.0) to access my s3 buckets and it is failing with the following error if the bucket name as a period in it.

$ aws s3 ls s3://my.bucket
HTTPSConnectionPool(host='s3-us-east-1a.amazonaws.com', port=443): Max retries exceeded with url: /my.bucket?delimiter=/&prefix= (Caused by <class 'socket.gaierror'>: [Errno 8] nodename nor servname provided, or not known)

Everything works fine if the bucket doesn't have periods:

$ aws s3 ls s3://mybucket

According to aws docs, periods are fine and I have no issues access the buckets via the website.

6
  • Where is the documentation you state that says periods are valid?
    – EEAA
    Jul 24, 2014 at 20:56
  • 1
  • I don't know if this helps, but I just tried to duplicate this problem and I had no issues doing an ls or otherwise operating on a bucket with a period. The CLI version reports as: aws-cli/1.3.21 Python/2.6.9 Linux/3.10.42-52.145.amzn1.x86_64. Installed boto packages are python-boto-2.30.0-1.0.amzn1.noarch and python-botocore-0.55.0-1.1.amzn1.noarch I'm running on Amazon Linux and did a yum update before and after doing this test.
    – vjones
    Jul 25, 2014 at 19:48
  • I'm running this from OS X. I've downloaded aws cli from the aws site and it seems to come with botocore-0.57.0. How do I tell what version of boto I'm running? How do I upgrade it? I'm also use google's gsutil and it also seems to use boto, so maybe there is a conflict? Is there a better place to get the aws cli? Jul 26, 2014 at 15:53
  • Update: I installed pip and install boto, then reinstalled the aws-cli and still get the same issue. Jul 26, 2014 at 16:01

2 Answers 2

4

Had this same problem today. The solution is specifying your region.

What wasn't working:

aws s3 sync --acl public-read dist/ s3://some.bucket.name/

What works now:

aws s3 --region us-east-1 sync --acl public-read dist/ s3://some.bucket.name/

EDIT: If all your buckets are going to exist in the same regions, go to command line (in OSX):

aws configure

If you haven't supplied your AWS keys, do so then. Question #3 should be Default region. in my case I entered:

us-east-1

Now I no longer have to specify region unless the bucket is outside my default region.

1
  • 1
    If you use Ireland as region you need to set this to eu-west-1 (and not ireland even though that is what the bucket say it's region is) Dec 23, 2014 at 14:24
2

...I encountered a similar problem with my account.

I found (through trial and error) that when I used the wrong region identifier, I was getting the Errno 8.

Here's what worked:

  • us-west-2

Here's what didn't work:

  • us-west
  • us-west-2a

I couldn't find any definitive help about what would work (or not work) when specifying a region identifier, so this answer is completely empirical and may not help in all cases.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .