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,540 points
4,446 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,170 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
• 58,020 points
6,413 views
+1 vote
3 answers
+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,640 points
2,218 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,170 points
11,407 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,170 points
4,178 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP