You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The AWS CLI seems to not respect the same configuration sources as the normal AWS SDK, instead it enforces the existence of a $HOME/.aws/config, and completely fails if it doesn't exist and can't be created... even if all the configuration was available through the environment.
Regression Issue
Select this option if this issue appears to be a regression.
Expected Behavior
The AWS CLI should support all standard methods of passing AWS Credentials without arbitrary requirements
Current Behavior
The AWS CLI attempt to read/create a directory in $HOME and crashes if it can't, even if proper configuration was supplied through environment variables.
With this configuration the AWS CLI will fail with: fatal error: [Errno 13] Permission denied: '/.aws'
Possible Solution
Fail gracefully and attempt other configuration sources instead of attempting to create a non-existent directory. Honestly I don't see why it should create that directory at all if configuration is supplied through the environment.
Hi @albgus, thanks for reaching out. I have tried the same set-up and the reproduction steps, I did not get the same issue. Could you please check and clarify the $HOME and its permissions, as well as the user if it has necessary permissions to access and read directories. Thank you.
adev-code
added
response-requested
Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
and removed
investigating
This issue is being investigated and/or work is in progress to resolve the issue.
labels
Nov 26, 2024
I can say that we have also had issues where we don't necessarily have or want write permissions in $HOME in k8s containers
in our case it's the creation of /.aws/cli/cache that causes the issue
I think the goal for both of us is some way not to generate any files, like an AWS_NO_CACHE environment variable.
Describe the bug
The AWS CLI seems to not respect the same configuration sources as the normal AWS SDK, instead it enforces the existence of a
$HOME/.aws/config
, and completely fails if it doesn't exist and can't be created... even if all the configuration was available through the environment.Regression Issue
Expected Behavior
The AWS CLI should support all standard methods of passing AWS Credentials without arbitrary requirements
Current Behavior
The AWS CLI attempt to read/create a directory in $HOME and crashes if it can't, even if proper configuration was supplied through environment variables.
Reproduction Steps
Start a container with this image (or similar): https://hub.docker.com/r/bitnami/aws-cli
Mount credentials through environment, or IRSA: https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html
With this configuration the AWS CLI will fail with:
fatal error: [Errno 13] Permission denied: '/.aws'
Possible Solution
Fail gracefully and attempt other configuration sources instead of attempting to create a non-existent directory. Honestly I don't see why it should create that directory at all if configuration is supplied through the environment.
Additional Information/Context
No response
CLI version used
aws-cli/2.21.0 Python/3.11.10 Linux/6.1.102 source/x86_64.debian.12
Environment details (OS name and version, etc.)
Docker: bitnami/aws-cli:latest
The text was updated successfully, but these errors were encountered: