Last active
November 23, 2016 12:53
-
-
Save mgla/661a5d419319f6b183414efd23078c8d to your computer and use it in GitHub Desktop.
Find AWS SNS subscription that can be cancelled without authentication.
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_PROFILE=aws-profile; for id in `aws --profile $AWS_PROFILE sns list-subscriptions | jq -r '.Subscriptions |.[] | .SubscriptionArn '`; do aws --profile $AWS_PROFILE sns get-subscription-attributes --subscription-arn $id | jq '.Attributes | select(.ConfirmationWasAuthenticated == "false") | { Endpoint: .Endpoint, ConfirmationWasAuthenticated: .ConfirmationWasAuthenticated, Protocol: .Protocol}'; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment