Created
April 11, 2025 12:06
-
-
Save stuaxo/81519d345616a0aafc399dc3437ae86b to your computer and use it in GitHub Desktop.
aws-env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws-env() { | |
export AWS_REGION=$(aws configure get region) | |
export AWS_ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text) | |
export AWS_ACCESS_KEY_ID=$(aws configure get aws_access_key_id) | |
export AWS_SECRET_ACCESS_KEY=$(aws configure get aws_secret_access_key) | |
echo "AWS environment variables set:" | |
echo "AWS_REGION=$AWS_REGION" | |
echo "AWS_ACCOUNT_ID=$AWS_ACCOUNT_ID" | |
echo "AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID" | |
echo "AWS_SECRET_ACCESS_KEY=********" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment