This file contains hidden or 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
# Use macOS keychain to store AWS access keys | |
# Alias to return AWS access keys from macOS keychain as input to credential_process | |
# ~/.aws/cli/alias | |
keychain = | |
!f() { | |
# Pass in aws profile name | |
# Assumes you are using (default) login keychain | |
access_key_id=$(security find-generic-password -s "aws profile ${1}" -a "AccessKeyId" -w) | |
secret_access_key=$(security find-generic-password -s "aws profile ${1}" -a "SecretAccessKey" -w) |