Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fakes3 access key issue #12

Open
rahulinux opened this issue Jul 7, 2014 · 3 comments
Open

Fakes3 access key issue #12

rahulinux opened this issue Jul 7, 2014 · 3 comments

Comments

@rahulinux
Copy link

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.
@jamesw201
Copy link

is there a solution to this problem?

@jamesw201
Copy link

Thanks Rahul, much appreciated!

On Thu, 5 Nov 2015 at 09:08 Rahul Patil notifications@github.com 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
#12 (comment)
.

@brett--anderson
Copy link

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));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants