4

I have a forward slash in aws secret key.

When I try to connect to s3 sink

Caused by: java.lang.IllegalArgumentException: Invalid hostname in URI s3://xxxx:xxxx@jelogs/je.1359961366545
    at org.apache.hadoop.fs.s3.S3Credentials.initialize(S3Credentials.java:41)

When I encode forward slash with %2F, I get

The request signature we calculated does not match the signature you provided. Check your key and signing method.

How should I encode my secret key.

4

3 回答 3

4

samthebest solution works, you just have to add "" surrounding the keys. Here how to use it:

hadoop distcp -Dfs.s3a.awsAccessKeyId="yourkey" -Dfs.s3a.awsSecretAccessKey="yoursecret" <your_hdfs_path> s3a://<your-bucket>
于 2015-10-28T19:59:14.263 回答
3

I end up creating a new secret key without forward slashes. This is a know issue and generating new key is only solution.

于 2013-02-05T06:20:48.603 回答
2

Use

-Dfs.s3n.awsAccessKeyId=<your-key> -Dfs.s3n.awsSecretAccessKey=<your-secret-key>

e.g.

hadoop distcp -Dfs.s3n.awsAccessKeyId=<your-key> -Dfs.s3n.awsSecretAccessKey=<your-secret-key> -<subsubcommand> <args>

or

hadoop fs -Dfs.s3n.awsAccessKeyId=<your-key> -Dfs.s3n.awsSecretAccessKey=<your-secret-key> -<subsubcommand> <args>
于 2014-05-08T16:15:45.250 回答