aws-cli
aws-cli copied to clipboard
Add environment variable to configure assume-role-with-web-identity credential cache directory
Issue #, if available: A description of the problem was discussed in #4374, which was closed by the author because they had a workaround. This addresses the problem directly.
Description of changes:
This makes the credential cache directory (default: ~/.aws/cli/cache) used to store temporary credentials obtained using AssumeRoleWithWebIdentity configurable using the environment variable AWS_CREDENTIAL_CACHE_DIR. The use case is environments where the home directory is mounted as read-only. The cache directory being configurable means it can be pointed at a writable volume.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Hi @jeremydonahue,
I added a comment at https://github.com/aws/aws-cli/issues/4374#issuecomment-1251306126. The main concern is that the AWS CLI can write to other directories as well, for example, the AWS SSO cache at ~/.aws/sso/cache. So, read only mounts would still affect this functionality.
Thanks, I responded there.