$ aws sns create-topic --name topic1
{
"TopicArn": "arn:aws:sns:ap-northeast-1:<ユーザーID>:topic1"
}
$ aws sns list-topics
{
"Topics": [
(中略)
{
"TopicArn": "arn:aws:sns:ap-northeast-1:<ユーザーID>:topic1"
}
]
}
- S3にファイルアップロードされたらメール通知されるよう設定する
$ aws sns subscribe --topic-arn arn:aws:sns:ap-northeast-1:<ユーザーID>:topic1 --protocol email --notification-endpoint ******@gmail.com
{
"SubscriptionArn": "pending confirmation"
}
$ aws sns publish --topic-arn arn:aws:sns:ap-northeast-1:<ユーザーID>:topic1 --message "hello"
{
"MessageId": "76ef3606-809d-5182-b684-67cfe594e762"
}