I want to take aws credentials from the aws-vault exec environment and store them in a file
When I try to print the credentials with
aws-vault exec default -- echo ${AWS_ACCESS_KEY_ID}
I got only an empty string
I want to take aws credentials from the aws-vault exec environment and store them in a file
When I try to print the credentials with
aws-vault exec default -- echo ${AWS_ACCESS_KEY_ID}
I got only an empty string
As per aws-vault : How it works,
Environment variables (AWS_ACCESS_KEY_ID
, AWS_SECRET_ACCESS_KEY
, AWS_SESSION_TOKEN
etc.) are written to the sub-process with aws-vault exec
, so you can grep out for AWS_SECRET_ACCESS_KEY
like below:-
aws-vault exec default -- env | grep AWS_SECRET_ACCESS_KEY