Skip to content

Instantly share code, notes, and snippets.

@Raffo
Last active December 7, 2018 13:42
Show Gist options
  • Save Raffo/1ece28df14ec78ee455e5d1c28b08d74 to your computer and use it in GitHub Desktop.
Save Raffo/1ece28df14ec78ee455e5d1c28b08d74 to your computer and use it in GitHub Desktop.
AWS gist

Get all the certificate names and date starting with 20XX

aws iam list-server-certificates --query 'ServerCertificateMetadataList[?starts_with(Expiration, `20XX-`)]' | jq .[].ServerCertificateName,.[].Expiration

Check when a CloudFront distribution finished updating:

while true; do  a=`aws cloudfront get-distribution --id $DISTRIBUTION_ID | jq .Distribution.Status`; if [ "$a" != \"InProgress\" ]; then echo $a; say "agg fatt"; fi; done;

Get the IAM role of an instance

curl http://169.254.169.254/latest/meta-data/iam/security-credentials/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment