Complete the code to create an SNS topic named 'MyTopic'.
aws sns create-topic --name [1]The command aws sns create-topic --name MyTopic creates an SNS topic named 'MyTopic'.
Complete the code to subscribe an email endpoint to the SNS topic 'MyTopic'.
aws sns subscribe --topic-arn arn:aws:sns:us-east-1:123456789012:MyTopic --protocol [1] --notification-endpoint user@example.com
To subscribe an email endpoint, the protocol must be 'email'.
Fix the error in the command to subscribe an SMS endpoint to the SNS topic.
aws sns subscribe --topic-arn arn:aws:sns:us-east-1:123456789012:MyTopic --protocol [1] --notification-endpoint +1234567890
The correct protocol for SMS subscriptions is 'sms'.
Fill both blanks to subscribe a Lambda function to the SNS topic.
aws sns subscribe --topic-arn arn:aws:sns:us-east-1:123456789012:MyTopic --protocol [1] --notification-endpoint arn:aws:lambda:us-east-1:123456789012:function:[2]
To subscribe a Lambda function, use protocol 'lambda' and specify the Lambda function name in the ARN.
Fill all three blanks to create an SNS topic, subscribe an email endpoint, and publish a message.
aws sns create-topic --name [1] aws sns subscribe --topic-arn arn:aws:sns:us-east-1:123456789012:[2] --protocol [3] --notification-endpoint user@example.com aws sns publish --topic-arn arn:aws:sns:us-east-1:123456789012:[2] --message "Hello from SNS!"
The topic is created with name 'MyTopic'. The subscription and publish commands use the topic ARN with 'MyTopic'. The protocol for email subscription is 'email'.