Is there a way to export an AWS CLI Profile to Environment Variables?
问题 When working with certain third-party tools like Terraform, it's not easily possible to specify an AWS CLI profile, and I like working with the environment variables better than the profiles. Is there a way for me to have the AWS CLI simply export the current profile as AWS_ACCESS_KEY_ID and AWS_SECRET_KEY environment variables to my session? 回答1: you could use the following command to set your environment variable aws configure get default.aws_access_key_id aws configure get default.aws