Creating the initial resources - Amazon Simple Notification Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Creating the initial resources

This page describes how to create the following resources for the message archiving and analytics example use case:

  • An Amazon Simple Storage Service (Amazon S3) bucket

  • Two Amazon Simple Queue Service (Amazon SQS) queues

  • An Amazon SNS topic

  • Two Amazon SQS subscriptions to the Amazon SNS topic

To create the initial resources
  1. Create the Amazon S3 bucket:

    1. Open the Amazon S3 console.

    2. Choose Create bucket.

    3. For Bucket name, enter a globally unique name. Keep the other fields as the defaults.

    4. Choose Create bucket.

    For more information about Amazon S3 buckets, see Creating a bucket in the Amazon Simple Storage Service User Guide and Working with Amazon S3 Buckets in the Amazon Simple Storage Service User Guide.

  2. Create the two Amazon SQS queues:

    1. Open the Amazon SQS console.

    2. Choose Create queue.

    3. For Type, choose Standard.

    4. For Name, enter ticketPaymentQueue.

    5. Under Access policy, for Choose method, choose Advanced.

    6. In the JSON policy box, paste the following policy:

      { "Version": "2008-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "" }, "Action": "sqs:SendMessage", "Resource": "*", "Condition": { "ArnEquals": { "aws:SourceArn": "arn:aws-cn:sns:us-east-1:123456789012:ticketTopic" } } } ] }

      In this access policy, replace the Amazon Web Services account number (123456789012) with your own, and change the Amazon Region (us-east-1) accordingly.

    7. Choose Create queue.

    8. Repeat these steps to create a second SQS queue named ticketFraudQueue.

    For more information on creating SQS queues, see Creating an Amazon SQS queue (console) in the Amazon Simple Queue Service Developer Guide.

  3. Create the SNS topic:

    1. Open the Topics page of the Amazon SNS console.

    2. Choose Create topic.

    3. Under Details, for Type, choose Standard.

    4. For Name, enter ticketTopic.

    5. Choose Create topic.

    For more information on creating SNS topics, see Creating an Amazon SNS topic.

  4. Subscribe both SQS queues to the SNS topic:

    1. In the Amazon SNS console, on the ticketTopic topic's details page, choose Create subscription.

    2. Under Details, for Protocol, choose Amazon SQS.

    3. For Endpoint, choose the Amazon Resource Name (ARN) of the ticketPaymentQueue queue.

    4. Choose Create subscription.

    5. Repeat these steps to create a second subscription using the ARN of the ticketFraudQueue queue.

      For more information on subscribing to SNS topics, see Subscribing to an Amazon SNS topic. You can also subscribe SQS queues to SNS topics from the Amazon SQS console. For more information, see Subscribing an Amazon SQS queue to an Amazon SNS topic (console) in the Amazon Simple Queue Service Developer Guide.

You've created the initial resources for this example use case. To continue, see Creating the Kinesis Data Firehose delivery stream.