Skip to content

Instantly share code, notes, and snippets.

@1a35e1
Created November 14, 2023 21:25
Show Gist options
  • Save 1a35e1/096d634b90a1ba3c968f8addeeb8e27a to your computer and use it in GitHub Desktop.
Save 1a35e1/096d634b90a1ba3c968f8addeeb8e27a to your computer and use it in GitHub Desktop.
Quickly truncate endpoints from an SNS application
# This is destructive. Please think before executing.
SOME_ARN="your-arn-here"
aws sns list-endpoints-by-platform-application --platform-application-arn $SOME_ARN | \
jq -r '.Endpoints[].EndpointArn' | \
xargs -I {} aws sns delete-endpoint --endpoint-arn {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment