AWS Profile is not used

Create issue
Issue #6 resolved
David Lee created an issue

Thanks a LOT for this plugin ! An issue I have is that I need to pass in my AWS credentials explicitly. I make big use of profiles in $HOME/.aws/credentials. The code works if the account is the default profile but not if its in another profile.
Profile should be configurable and/or implicit. Example, the Java SDK and CLI and Python SDK use AWS_PROFILE env var.

This works 'out of the box' with the Java SDK if you use the default credentials provider chain instead of an explicit provider.

The docs and javadocs are not 100% clear on this, there was a period of transition when the SDK's were being reworked, and 3rd party SDK's cathing up. For the last 2 years its been stable.

Here is some history

If you use the AWSDefaultCredentialsProviderChain it should all 'just work'

If you need to override any bit then there are a variety of specialized constructors and such.

Note this works for all the 'standard' credential mechanisms, and should work for new ones as they come along.

Comments (5)

  1. Patrick Double repo owner
    • changed status to open

    @DALDEI I see you forked this repo. Let me know if you are planning to implement this and I'll wait for a PR. Otherwise I'll do it. Thanks.

  2. Patrick Double repo owner

    I added a test for the profile selection out of the credentials file. It's all working. If you don't set the access key and secret at all, the default credential provider is used, so you get the behavior you are requesting.

    Please use the latest released version and let me know if it's not working for you.

  3. David Lee reporter

    Works great thanks ! Sorry I didn't have a chance to work on it. My excuse being I simply don't remember how to build and test a copy of a plugin without changing the all the id's --

  4. Log in to comment