Created
June 18, 2019 13:41
-
-
Save marknca/6d86318581497b7e3cf37fb7dcd83ca2 to your computer and use it in GitHub Desktop.
Security focused AWS CLI commands
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
aws acm list-certificates | jq '.CertificateSummaryList' | jq -r '.[].CertificateArn' | while read -r l; do echo "CERT: $l" && aws acm describe-certificate --certificate-arn $l | jq '.Certificate | .NotAfter' | xargs -I {} date -r {} && echo ""; done; |
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
aws iam list-users | jq '.Users' | jq -r '.[].UserName' | xargs -n1 -I {} sh -c "echo USER: {} && aws iam list-attached-user-policies --user-name {} | jq '.AttachedPolicies' | jq -r '.[].PolicyName'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment