amazon-s3-url-signer icon indicating copy to clipboard operation
amazon-s3-url-signer copied to clipboard

Fakes3 access key issue

Open rahulinux opened this issue 10 years ago • 3 comments

Which access key id should be use, I've use fake details and getting below error

ERROR: S3 error: 403 (InvalidAccessKeyId): The AWS Access Key Id you provided does not exist in our records.

rahulinux avatar Jul 07 '14 05:07 rahulinux

is there a solution to this problem?

jamesw201 avatar Nov 04 '15 17:11 jamesw201

Thanks Rahul, much appreciated!

On Thu, 5 Nov 2015 at 09:08 Rahul Patil [email protected] wrote:

I had pointed s3.amazon.com to where my fakes3 where running... in /etc/hosts file

— Reply to this email directly or view it on GitHub https://github.com/dyashkir/amazon-s3-url-signer/issues/12#issuecomment-153997932 .

jamesw201 avatar Nov 06 '15 07:11 jamesw201

For others having this same issue and discovering this post, I found that setting the 'force path' option solved the issue for me:

In python (boto3):

boto3.client(
            's3',
            endpoint_url='http://%s:%s' % (os.environ['AWS_S3_HOST'], str(os.environ['AWS_S3_PORT'])),
            aws_access_key_id=os.environ['AWS_ACCESS_KEY_ID'],
            aws_secret_access_key=os.environ['AWS_SECRET_ACCESS_KEY'],
            config=Config(s3={'addressing_style': 'path'}))

In Java (AWS-SDK):

ClientConfiguration config = new ClientConfiguration();
config.setMaxConnections(maxConnections);
config.setProtocol(Protocol.HTTP);
BasicAWSCredentials awsCreds = new BasicAWSCredentials(access_key_id, secret_access_key);
this.s3client = new AmazonS3Client(awsCreds, config);
this.s3client.setEndpoint(awsS3Endpoint);
this.s3client.setS3ClientOptions(new S3ClientOptions().withPathStyleAccess(true));

brett--anderson avatar Mar 04 '16 15:03 brett--anderson