amazon-s3-url-signer
amazon-s3-url-signer copied to clipboard
Fakes3 access key issue
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.
is there a solution to this problem?
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 .
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));