CmdID

CmdID / Commands

aws-sns

Create topics and subscriptions, send and receive messages, and monitor events and logs for the Amazon Simple Notification Service. tldr-pages

On several platforms

Opens CmdID with your command. It is read in your browser and sent nowhere.

Several platforms

from tldr-pages, CC BY 4.0

List all objects of a specific type

aws sns list-origination-numbersIdentify

Create a topic with a specific name and show its Amazon Resource Name (ARN)

aws sns create-topic --name nameIdentify
--nameThe name of the topic you want to create. AWS CLI reference

Subscribe an email address to the topic with a specific ARN and show the subscription ARN

aws sns subscribe --topic-arn topic_ARN --protocol email --notification-endpoint emailIdentify
--topic-arnThe ARN of the topic you want to subscribe to. AWS CLI reference
--protocolThe protocol that you want to use. AWS CLI reference
--notification-endpointThe endpoint that you want to receive notifications. AWS CLI reference

Publish a message to a specific topic or phone number and show the message ID

aws sns publish --topic-arn "arn:aws:sns:us-west-2:123456789012:topic-name"|--phone-number +1-555-555-0100 --message file://path/to/fileIdentify
--topic-arnThe topic you want to publish to. AWS CLI reference

Delete the subscription with a specific ARN from its topic

aws sns unsubscribe --subscription-arn subscription_ARNIdentify
--subscription-arnThe ARN of the subscription to be deleted. AWS CLI reference

Create a platform endpoint

aws sns create-platform-endpoint --platform-application-arn platform_application_ARN --token tokenIdentify
--platform-application-arnPlatformApplicationArn returned from CreatePlatformApplication is used to create a an endpoint. AWS CLI reference
--tokenUnique identifier created by the notification service for an app on a device. AWS CLI reference

Add a statement to a topic's access control policy

aws sns add-permission --topic-arn topic_ARN --label topic_label --aws-account-id account_id --action-name AddPermissionIdentify
--topic-arnThe ARN of the topic whose access control policy you wish to modify. AWS CLI reference
--labelA unique identifier for the new policy statement. AWS CLI reference
--aws-account-idThe Amazon Web Services account IDs of the users (principals) who will be given access to the specified actions. AWS CLI reference
--action-nameThe action you want to allow for the specified principal(s). AWS CLI reference

Add a tag to the topic with a specific ARN

aws sns tag-resource --resource-arn topic_ARN --tags Key=tag1_key Key=tag2_key,Value=tag2_value ...Identify
--resource-arnThe ARN of the topic to which to add tags. AWS CLI reference
--tagsThe tags to be added to the specified topic. AWS CLI reference