Skip to content

Confusing error message when AWS_ env vars are set in combination with --profile flag #877

@Octogonapus

Description

@Octogonapus

I received this error message:

specify either the --profile flag or --access-key-id with --secret-access-key and optionally --session-token, but not both

My configuration had the --profile flag set and AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_SESSION_TOKEN environment variables set. I was in the process of refactoring things so was between using env vars and using the profile (i.e. generating a profile using those env vars, and then setting the --profile flag).

I found this error initially confusing because I never set the --access-key-id, etc. flags, but it seems they are being inferred from the env vars. Perhaps updating the error message would be enough? I could probably PR that if it is wanted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions