Section 19: AWS Integration & Messaging: SQS, SNS & Kinesis: SNS Flashcards
What aws service do you use if you want to send one message to many receivers? Please get the acryonym and full name.
Smiple Notification Service. SNS
What aws service goes where the yellow box is?
AWS SNS
Can you use an SNS topic to send a message to an SQS queue?
Yes
What do they call SNS things? like, the big thing, like if you’re using SNS, you have an SNS what?
Topic
T/F
SNS is for pub/sub models (aws called them pub/sub messaging paradigms, in case you see that later).
True
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?
Event producer
What is and event producer, in terms of aws sns
it’s the thing that gets your messages to your SNS tpoic.
How many topics can an event producer send a message to?
just one.
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).
up to 12,500,000
Is an event producer the publisher or the subscriber in a pub/sub model?
Publisher.
how many SNS topics have you have at a time?
100,000 per account.
Does each suscriber to the topic get all the message sent out by a topic?
Yes. Though there is a new feature to filter messages (or there will be one, soon).
T/F
SNS is for queue type models.
False. It’s for pub/sub models.
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.
T
- Is SNS limited in what you can use it with?
- How might you use with an ASG?
- WIth an S3 bucket?
- It doesn’t seem to be.
- ASG notifications could be published to an SNS topic
- S3 bucket events could be published to an SNS topic
- Is SNS limited in what you can use it with?
- With CloudFormation?
- With AWS DMS?
- It doesn’t seem to be.
- CloudFormation State Changes could be published to an SNS topic
- AWS DMS New Replica things could be published to an SNS topic.
There are two main methods of publishing using SNS, what are they? (just names, will ask for details later)
- Topic Publish (using the SDK)
- Direct Publish (for mobile apps SDK)
Are these the super broad steps for using SNS Topic Publish, or for using SNS Direct Publish?
- create a topic
- create a subscription
- publish to the topic
Topic Publish (which, again, you need the SDK for)
Are these the super broad steps for using SNS Topic Publish, or for using SNS Direct Publish?
- Create a platform application
- create a platform endpoint
- publish to the platform endpoint
- works with Google GCM, Apple APNS, Amazon ADM
Direct Publish (again, using mobile apps SDK)
What kind of security does aws SNS use?
- in flight encryption using HTTPS API
- at rest encryption using KMS keys
- client side encryption if the client wants to perform encryption/decryption itself.
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: _____
- using HTTPS API
- using KMS keys
- wants to perform encyrption/decryption itself
What are the three main types of security to think about with SNS?
- Encyrption
- access controls
- sns access policies
What are the AWS SNS access controls?
IAM policies to regulate access to the SNS API.
- What are AWS SNS Access Policies similar to?
- What are they useful for?
- SNS Access Policies are like S3 bucket policies
- 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
What is this called?
SNS + SQS Fan Out
What is SNS + SQS Fan Out?
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”).
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.
True
Is SNS with SQS fan out described as fully decoupled, with no data loss?
Yes
When you use SNS with SQS fan out, does SQS allow for data persistence, deployed processing retries of work?
yes
When using SNS with SQS fan out, do you have the ability to add more SQS subsribers (subscribers to the SNS topic) over time?
Yes
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?)
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.
Does SNS and SQS Fan Out work with SQS queues in multiple regions?
yes, using Cross Region Delivery.
How many S3 event rules can you make for the same combination of event type (example: object create) and prefix (example: images/)?
One
(this will be relevant to the section in a later question)
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?
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.
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.
True.
By default, does SNS use FIFO (does it gaurantee first in first out reception of messages by subscribers?)
No. But, you can enable FIFO. This way, subscribers recieve messages in the order in which they were sent by the producer.
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
- yes
- yes
Can an SNS FIFO topic have SQS Standard and SQS FIFO queues as subscribers?
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.
Do SNS FIFO topics have limited throughput (the same throughput as SQS FIFO)?
Yes
Say you want only a subset of your SNS topic subscribers to get certain messages. Can you accomplish this?
Yes. through filtering in SNS.
What is SNS message filtering?
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.
Do SNS FIFO topics names need to end in “.fifo”, the same way SQS FIFO queues do?
Yes
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?
- Amazon Kinesis Data FIrehose
- Amazon SQS
- AWS Lambda
- 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.
Can you create an SNS subscriber filter policy for SNS topic type - Standard?
Yes.
Where do you create the subscription filter policy - in the SNS topic creation console page, or the SNS topic subscription create console page?
The SNS topic subscription create console page.
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?
Yes.
Can you publish a message to a topic from the SNS topic console page?
Yes