Created
November 3, 2022 19:03
-
-
Save genyrosk/6aceceff2caf9ee4c540a84afe5c93f6 to your computer and use it in GitHub Desktop.
AWS cli aliases
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
# put into .aws/cli/alias | |
[toplevel] | |
get-secret = | |
!f() { | |
default_region=$(aws configure get region) | |
printf "Enter the ARN of the secret: " | |
read secret_arn | |
secret_arn=$(echo $secret_arn | xargs) | |
printf "Enter the Region (default is ${default_region}): " | |
read region | |
region="${region:-${default_region}}" | |
echo "" | |
aws secretsmanager get-secret-value --secret-id ${secret_arn} --region ${region} --output yaml --no-cli-pager | |
}; f | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment