Skip to content

Instantly share code, notes, and snippets.

@michiel
Created April 8, 2020 03:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michiel/a30f991fe70ff4689d91c0fb65ee7241 to your computer and use it in GitHub Desktop.
Save michiel/a30f991fe70ff4689d91c0fb65ee7241 to your computer and use it in GitHub Desktop.
List active cloudfront deployments with AWS CLI and jq
#!/bin/sh
AWS_PROFILE=my-profile
AWS_REGION=ap-southeast-2
aws --profile=$AWS_PROFILE \
--region=$AWS_REGION \
cloudfront list-distributions \
| jq '.DistributionList.Items[].Origins.Items[] | {Id: .Id, OriginPath: .OriginPath}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment