aws / aws-cli

Universal Command Line Interface for Amazon Web Services
Other
15.29k stars 4.07k forks source link

aws configure set aws_security_token is not backwards compatible with boto #5084

Open thenoid opened 4 years ago

thenoid commented 4 years ago

Issue

Old school boto expects a session token to be stored as a value of aws_security_token in ~/.aws/credentials Boto3 stores the same value in aws_session_token in ~/.aws/credentials

If you run aws configure set aws_session_token ${VALUE} the aws cli will correctly place the value in ~/.aws/credentials

Running aws configure set aws_security_token ${VALUE} the aws_security_token value ends up in a users ~/.aws/config instead of ~/.aws/credentials.

So for those of us who still have legacy boto code hanging around, that means we are required to manually munge the ~/.aws/credentials file to properly inject the aws_security_token.

Solution

Provide backward compatibility by writing aws_security_token to the credentials file.

Related issues

https://github.com/boto/boto/issues/2988 https://github.com/aws/aws-cli/issues/1197

joguSD commented 4 years ago

I think this is a reasonable request given that botocore/awscli also respects this naming to source from.

github-actions[bot] commented 2 years ago

Greetings! It looks like this issue hasn’t been active in longer than one year. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one.

amberkushwaha commented 3 months ago

implementation,Add a comment with repository should follow its main instruction and file bonding in it.