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

[feat] Use credentials_file variable in config file #8958

Open
2 tasks
lonix1 opened this issue Oct 8, 2024 · 3 comments
Open
2 tasks

[feat] Use credentials_file variable in config file #8958

lonix1 opened this issue Oct 8, 2024 · 3 comments
Labels
configuration credential-provider feature-request A feature should be added or improved. p2 This is a standard priority issue

Comments

@lonix1
Copy link

lonix1 commented Oct 8, 2024

Describe the feature

I want to keep user secrets separate from config.

Secrets file at custom path /home/me/.secrets/aws/credentials:

[default]
aws_access_key_id=foo
aws_secret_access_key=bar

Config file at default path /home/me/.aws/config:

[default]
region=us-east-1
credentials_file=/home/me/.secrets/aws/credentials

I assumed I can use credentials_file as it's in the docs. However that doesn't work:

Unable to locate credentials. You can configure credentials by running "aws configure".

Please let us use credentials_file as a variable in the config file.

Use Case

  • To keep secrets and config separate
  • To keep secrets in well-known location
  • Plays nice with other tools

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CLI version used

2.18.1

Environment details (OS name and version, etc.)

ubuntu 22.04

@lonix1 lonix1 added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Oct 8, 2024
@tim-finnigan tim-finnigan self-assigned this Oct 8, 2024
@tim-finnigan
Copy link
Contributor

Thanks for reaching out. There's not a "Config Entry" for credentials_file in the table you referenced, so the current behavior is expected.

As an alternative, have you tried setting the environment variable AWS_SHARED_CREDENTIALS_FILE? (For more information on setting environment variables for the AWS CLI please refer to this documentation: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html)

@tim-finnigan tim-finnigan added configuration credential-provider response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. p2 This is a standard priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Oct 8, 2024
@lonix1
Copy link
Author

lonix1 commented Oct 9, 2024

Yes I tried that with the env var, and it works, thanks. That's a decent workaround, though must be set every time before using the cli, or added to the shell config (bashrc or whatever).

If possible someday, it would be nicer/cleaner to use the variable from inside the config file.

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Oct 9, 2024
@tim-finnigan
Copy link
Contributor

Thanks for following up and confirming. I think we can continue tracking this feature request for further review.

@tim-finnigan tim-finnigan removed their assignment Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration credential-provider feature-request A feature should be added or improved. p2 This is a standard priority issue
Projects
None yet
Development

No branches or pull requests

2 participants