wbingli / awscli-plugin-endpoint

An awscli plugin to configure service endpoint from aws configure file
Apache License 2.0
207 stars 23 forks source link

Doesn't seem to work with S3 #2

Closed ewosborne closed 7 years ago

ewosborne commented 7 years ago

I'm trying to use this with wasabi. After adding it, my config is:

[default] region = us-east-1

[profile wasabi] aws_access_key_id=$FOO aws_secret_access_key=$BAR region = us-east-1 endpoint-url = https://s3.wasabisys.com

[plugins] endpoint = awscli_plugin_endpoint

'aws s3 ls --profile wasabi --endpoint-url https://s3.wasabisys.com' works. 'aws s3 ls --profile wasabi' gives me:


An error occurred (InvalidAccessKeyId) when calling the ListBuckets operation: The AWS Access Key Id you provided does not exist in our records.

It feels like it's not picking up the endpoint URL, and unless I've gone cross-eyed staring at it, it looks to be configured correctly.

How do I help debug this?

wbingli commented 7 years ago

The --endpoint-url will override the endpoint for every service. Well, this plugin supports endpoint configuration per service, which means below configuration is the right one:

[profile wasabi]
aws_access_key_id=$FOO
aws_secret_access_key=$BAR
region = us-east-1
s3 =
    endpoint_url = https://s3.wasabisys.com

Try to below this command, it should config your profile right:

aws configure --profile wasabi set s3.endpoint_url https://s3.wasabisys.com

wbingli commented 7 years ago

I updated the read me. Let me know if it's clear for you.

ewosborne commented 7 years ago

Looks clear and it works - thanks!