Kops: AWS credentials - should check ~/.aws/credentials

Created on 28 Jul 2017  路  6Comments  路  Source: kubernetes/kops

We seem to be skipping the local profile (I think)

lifecyclrotten

Most helpful comment

We just set this in our environment:
export AWS_SDK_LOAD_CONFIG=1

If you want to use a specific profile:

export AWS_DEFAULT_PROFILE=staging-profile
export AWS_PROFILE=staging-profile

The combination of these env vars make both kops and aws cli use this profile.

All 6 comments

Looking into this further - the issue is that $HOME is not set by default in systemd tasks. We should figure our where we want HOME to be! An alternative is to explicitly set AWS_SHARED_CREDENTIALS_FILE

We just set this in our environment:
export AWS_SDK_LOAD_CONFIG=1

If you want to use a specific profile:

export AWS_DEFAULT_PROFILE=staging-profile
export AWS_PROFILE=staging-profile

The combination of these env vars make both kops and aws cli use this profile.

Should probably just follow the variable precedence that the awscli uses: http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html#config-settings-and-precedence

Looks like AWS_SDK_LOAD_CONFIG hits both config & credentials (I've seen weird issues between the awscli/boto3/other SDK where it wasn't looking in all the usual places).

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/lifecycle stale

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten
/remove-lifecycle stale

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Was this page helpful?
0 / 5 - 0 ratings