Section 19: AWS Integration & Messaging: SQS, SNS & Kinesis: SNS Flashcards

1
Q

What aws service do you use if you want to send one message to many receivers? Please get the acryonym and full name.

A

Smiple Notification Service. SNS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What aws service goes where the yellow box is?

A

AWS SNS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Can you use an SNS topic to send a message to an SQS queue?

A

Yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What do they call SNS things? like, the big thing, like if you’re using SNS, you have an SNS what?

A

Topic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

T/F

SNS is for pub/sub models (aws called them pub/sub messaging paradigms, in case you see that later).

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

When you’re using SNS and you have a topic, what is the industry/aws name for the thing that gets your message to the topic?

A

Event producer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is and event producer, in terms of aws sns

A

it’s the thing that gets your messages to your SNS tpoic.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How many topics can an event producer send a message to?

A

just one.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How many event receivers can subscribe to (listen to) an SNS topic? (i get the feeling it’s more specifically called listening to an SNS topic’s notifications).

A

up to 12,500,000

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Is an event producer the publisher or the subscriber in a pub/sub model?

A

Publisher.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

how many SNS topics have you have at a time?

A

100,000 per account.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Does each suscriber to the topic get all the message sent out by a topic?

A

Yes. Though there is a new feature to filter messages (or there will be one, soon).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

T/F

SNS is for queue type models.

A

False. It’s for pub/sub models.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

T/F

The Amazon SNS service can support a wide variety of needs including event notification, monitoring applications, workflow systems, time-sensitive (including real-time) information updates, mobile applications, and any other application that generates or consumes notifications.

A

T

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
  1. Is SNS limited in what you can use it with?
  2. How might you use with an ASG?
  3. WIth an S3 bucket?
A
  1. It doesn’t seem to be.
  2. ASG notifications could be published to an SNS topic
  3. S3 bucket events could be published to an SNS topic
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
  1. Is SNS limited in what you can use it with?
  2. With CloudFormation?
  3. With AWS DMS?
A
  1. It doesn’t seem to be.
  2. CloudFormation State Changes could be published to an SNS topic
  3. AWS DMS New Replica things could be published to an SNS topic.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

There are two main methods of publishing using SNS, what are they? (just names, will ask for details later)

A
  1. Topic Publish (using the SDK)
  2. Direct Publish (for mobile apps SDK)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Are these the super broad steps for using SNS Topic Publish, or for using SNS Direct Publish?

  1. create a topic
  2. create a subscription
  3. publish to the topic
A

Topic Publish (which, again, you need the SDK for)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Are these the super broad steps for using SNS Topic Publish, or for using SNS Direct Publish?

  1. Create a platform application
  2. create a platform endpoint
  3. publish to the platform endpoint
  4. works with Google GCM, Apple APNS, Amazon ADM
A

Direct Publish (again, using mobile apps SDK)

13
Q

What kind of security does aws SNS use?

A
  • in flight encryption using HTTPS API
  • at rest encryption using KMS keys
  • client side encryption if the client wants to perform encryption/decryption itself.
14
Q

what kind of encryption does sns security use:
1. in-flight encryption using: ________
2. at rest encyrption using: ________
3. client side encryption if the client: _____

A
  1. using HTTPS API
  2. using KMS keys
  3. wants to perform encyrption/decryption itself
14
Q

What are the three main types of security to think about with SNS?

A
  1. Encyrption
  2. access controls
  3. sns access policies
15
Q

What are the AWS SNS access controls?

A

IAM policies to regulate access to the SNS API.

16
Q
  1. What are AWS SNS Access Policies similar to?
  2. What are they useful for?
A
  1. SNS Access Policies are like S3 bucket policies
  2. they’re useful for cross account access to SNS topics; they’re useful for allowing other services (like S3) to write to an SNS topic
17
Q

What is this called?

A

SNS + SQS Fan Out

18
Q

What is SNS + SQS Fan Out?

A

The process of pushing an SNS topic message out to more than one SQS queue (i suppose the fan-like shape a diagram takes when you send a message from one SNS topic to multiple SQS queues is why this is called a “fan out”).

19
Q

T/F

When you’re using an SNS topic with multiple SQS queues, you push once in SNS and receive the message in all SQS queues that are subscribers of that topic.

A

True

20
Q

Is SNS with SQS fan out described as fully decoupled, with no data loss?

A

Yes

21
Q

When you use SNS with SQS fan out, does SQS allow for data persistence, deployed processing retries of work?

A

yes

22
Q

When using SNS with SQS fan out, do you have the ability to add more SQS subsribers (subscribers to the SNS topic) over time?

A

Yes

23
Q

What could be preventing SNS from getting messages to an SQS queue? (or be preventing an SQS queue from getting messages from an SNS topic?)

A

You might not have set up your SQS queue policy so it 1) allows for SNS to write to it, you have to make sure your SQS queue access policy allows for SNS to write (to the SQS queue, I imagine) and 2) the queue may not actually be suscribed to the SNS topic. remember, giving the sns topic the ability to send a message to an sqs queue is not the same thing as setting up the sqs queue to actually be subscribed to a topic. Then you need to give users or accounts to ability to publish to the topic. and read messages from the queue. Here are some direct quotes from aws, giving more info on all that:

  • For an Amazon SNS topic to be able to send messages to a queue, you must set a policy on the queue that allows the Amazon SNS topic to perform the sqs:SendMessage action.
  • To send messages to a queue through a topic, you must subscribe the queue to the Amazon SNS topic. You specify the queue by its ARN. To subscribe to a topic, you can use the Amazon SNS console, the sns-subscribe CLI command, or the Subscribe API action. Before you start, make sure you have the ARN for the queue that you want to subscribe.
  • Give IAM users or AWS accounts the appropriate permissions to publish to the Amazon SNS topic and read messages from the Amazon SQS queue.
24
Q

Does SNS and SQS Fan Out work with SQS queues in multiple regions?

A

yes, using Cross Region Delivery.

25
Q

How many S3 event rules can you make for the same combination of event type (example: object create) and prefix (example: images/)?

A

One

(this will be relevant to the section in a later question)

26
Q

Since you can only create one S3 event rule for the same combation of event type (example: object create) and prefix (example: images/), how could you send an s3 event notification for object create + images/ to multiple SQS queues, or to other (multiple) aws services?

A

You could use post the event notification to an SNS topic. From there, multple queues (or queues and a combination of aws services, or just aws services, whatever) could subscribe to that sns topic using that fan out pattern.

27
Q

T/F about SNS

It is designed to make web-scale computing easier for developers. Amazon SNS follows the “publish-subscribe” (pub-sub) messaging paradigm, with notifications being delivered to clients using a “push” mechanism that eliminates the need to periodically check or “poll” for new information and updates.

A

True.

28
Q

By default, does SNS use FIFO (does it gaurantee first in first out reception of messages by subscribers?)

A

No. But, you can enable FIFO. This way, subscribers recieve messages in the order in which they were sent by the producer.

29
Q

Does SNS FIFO work the same way as SQS FIFO in terms of:
1. Ordering by Message Group ID (all messages i the same group are ordered)
2. Deduplication using a Deduplication ID or Content Based Deduplication

A
  1. yes
  2. yes
30
Q
A
31
Q

Can an SNS FIFO topic have SQS Standard and SQS FIFO queues as subscribers?

A

Yes. The video transcript makes it seem like no, but per https://aws.amazon.com/about-aws/whats-new/2023/09/amazon-sns-fifo-topics-message-delivery-sqs-standard-queues/#:~:text=Amazon%20SNS%20FIFO%20topics%20now%20support%20message%20delivery%20to%20Amazon%20SQS%20Standard%20queues,-Posted%20On%3A%20Sep&text=You%20can%20now%20subscribe%20Amazon,%2DOut%20(FIFO)%20topics, the answer is yes.

32
Q

Do SNS FIFO topics have limited throughput (the same throughput as SQS FIFO)?

A

Yes

33
Q

Say you want only a subset of your SNS topic subscribers to get certain messages. Can you accomplish this?

A

Yes. through filtering in SNS.

34
Q

What is SNS message filtering?

A

A process of limiting what messages a subscriber receives by applying a filter policy to the topic subscription. I think that’s just some high falutin way of adding something to the topic’s json.

  • By default, an Amazon SNS topic subscriber receives every message that’s published to the topic. To receive only a subset of the messages, a subscriber must assign a filter policy to the topic subscription.
35
Q

Do SNS FIFO topics names need to end in “.fifo”, the same way SQS FIFO queues do?

A

Yes

36
Q

Say you created an SNS topic of type Standard. Now you’re creating a subscription for that topic. You have to choose a protocol, a “type of endpooint to subscribe”. It doesn’t say “subscribe to”, just “subscribe”. What are your protocol options?

A
  • Amazon Kinesis Data FIrehose
  • Amazon SQS
  • AWS Lambda
  • Email
  • Email - JSON
  • HTTP
  • HTTPS
  • SMS

it seems as though a protocol is the equivalent of an endpoint. for example, it seems like when you choose protocol “email”, you have to provide an email. This email gets treated as the endpoint.

37
Q

Can you create an SNS subscriber filter policy for SNS topic type - Standard?

A

Yes.

38
Q

Where do you create the subscription filter policy - in the SNS topic creation console page, or the SNS topic subscription create console page?

A

The SNS topic subscription create console page.

39
Q

Does an SNS topic subscription for type email require that you go to your email and confirm that you want to be subscribed to that sns topic?

A

Yes.

40
Q

Can you publish a message to a topic from the SNS topic console page?

A

Yes