Invalid hostname error when connecting to S3 using secret key

+1 vote

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?

Oct 11, 2018 in AWS by datageek
• 2,460 points
669 views

1 answer to this question.

0 votes

Hey, it works perfectly fine 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>

answered Oct 11, 2018 by Archana
• 4,150 points

Related Questions In AWS

0 votes
1 answer

AWS Access Key error when uploading to S3

You can try getting creating a new ...READ MORE

answered Feb 6, 2019 in AWS by Priyaj
• 57,530 points
2,736 views
+1 vote
3 answers

Log in to AWS using Access Key ID and Secret Access Key ID

Access keys consist of an access key ...READ MORE

answered Aug 17, 2018 in AWS by Priyaj
• 57,530 points
7,019 views
+1 vote
2 answers
0 votes
1 answer

Error when uploading image using Amazon S3

You are using the php's default method POST ...READ MORE

answered Mar 25, 2019 in AWS by Archana
• 5,600 points
303 views
0 votes
1 answer

AWS S3 CLI : error while trying to copy files locally using terminal

For the first error you should add ...READ MORE

answered Aug 3, 2018 in AWS by Archana
• 4,150 points
3,001 views
0 votes
1 answer

Error : [SSL : CERTIFICATION_VERIFY_FAILED] while trying to connect to S3

Probably your bucket name contains a dot, ...READ MORE

answered Aug 6, 2018 in AWS by Archana
• 4,150 points
636 views