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,440 points
139 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,090 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 in AWS by Priyaj
• 56,160 points
832 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
• 56,160 points
181 views
0 votes
1 answer
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,090 points
916 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,090 points
123 views