Skip to content

Instantly share code, notes, and snippets.

@cvega
Last active April 19, 2020 04:36
Show Gist options
  • Save cvega/ef5e0b5ee20255486fff389a47d3eff6 to your computer and use it in GitHub Desktop.
Save cvega/ef5e0b5ee20255486fff389a47d3eff6 to your computer and use it in GitHub Desktop.
AWS - ACM ARN by Domain Name using JQ
AWS_DEFAULT_REGION="us-east-1"
DOMAIN_NAME="snakeoil.dom"
cmd=$(aws acm list-certificates --region=$AWS_DEFAULT_REGION \
| jq -r ".CertificateSummaryList[] \
| select(.DomainName == $DOMAIN_NAME) \
| .CertificateArn")
echo $cmd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment