2

I'm trying to use s3.exe, a windows CLI for S3 from s3.codeplex.com, to PUT an object.

Here is the command I'm running:

c:\>s3 put My-Bucket file.txt /key:MYKEY /secret:MYSECRET

It returns: <403> Forbidden.

But when I try to PUT the file into a bucket without a hypen, it works.

c:\>s3 put MyNoHyphenBucket file.txt /key:MYKEY /secret:MYSECRET

Can someone else try it and see if they have the same issue? Any help on how to get it working with hyphenated bucket names would be greatly appreciated.

I'd be open to trying alternative s3 CLI for Windows.

doremi
  • 14,921
  • 30
  • 93
  • 148
  • Is there an `Error Code:` header included in the response? You may need to attach Wireshark if your client doesn't make it easy to dump the entire response header. – sarnold Mar 26 '12 at 00:04
  • It just returns: WebException (The remote server returned an error: (403) Forbidden.) with status code 403 – doremi Mar 26 '12 at 00:11
  • Can you try it out? Download s3.exe from the url above and try to put a file into a hyphenated bucket. Non-hyphenated bucket names work just fine... – doremi Mar 26 '12 at 00:12

2 Answers2

0

Are you using an EU or NA bucket?

I found this:

"European Bucket allows only lower case letters. Although Buckets created in the US may contain lower case and upper case both, Amazon recommends that you use all lower case letters when creating a bucket."

Apparently whatever's behind that also impacts hyphens.

With an EU bucket, I get the same behaviour (403) as yourself. Repeat experiment with an NA bucket, and it succeeds.

Nik
  • 2,718
  • 23
  • 34
  • Source: [Amazon S3 Bucket](http://www.bucketexplorer.com/documentation/amazon-s3--amazon-s3-buckets-introduction.html) – eggy Dec 19 '14 at 01:40
0

I saw this error on NOT US buckets. So, I created US bucket (select region US Standard when creating) and all works fine!