Other AWS Services (ACG) Flashcards
What is Amazon SQS?
A distributed message queue service which can be used to store messages while waiting for an app or a computer to process them.
Think of SQS as a way of assigning tasks for an app to complete.
Allows us to decouple the components of an app so that they are independent.
AKA Decoupling Your Infrastructure
Is SQS a pull-based or push-based service?
Pull-based service.
What AWS service is a push-based service?
Amazon SNS
Which AWS service is a pull-based service?
Amazon SQS
What is visibility timeout?
When an app pulls a message from SQS, the message turns invisible so no other servers can process the same message. The visibility timeout is the amount of time the app server gets to process the message.
How large can SQS messages be?
Messages can be up to 256KB in size.
What format are SQS messages?
Messages are always text data, including XML, JSON, and unformatted plain text.
SQS messages are processed only once. True or False?
FALSE
Messages will be processed at least once.
How long are messages kept in the queue?
Messages can be kept in the queue from one minute to 14 days. The default retention period is 4 days.
What are the two types of queue?
Standard Queues (best-effort ordering) and FIFO (ordering is strictly preserved)
What is the limit for FIFO queues?
300 TPS (transactions per second)
What is the default visibility timeout and max limit?
30 seconds default, maximum 12 hours
How do you save money and avoid empty responses with SQS?
Configure long polling (always go for long polling on exam)
What are the disadvantages of using short polling?
A response is returned immediately even if no messages are in the queue. You will accrue a cost per response.
When should you use a Delay Queue?
For large distributed applications. When you need to delay or postpone messages in SQS. You might want to introduce a delay of a few seconds in order to allow for updates to a database before sending out notifications.
What is best practice for managing large SQS messages over 256KB?
Use an S3 bucket to store the messages 256KB up to 2GB.
Use Amazon SQS Extended Client Library for Java to manage them.
You’ll also need AWS SDK for Java to utilize the S3 API.
*You can’t use the CLI
What is the range of the delay period for messages in the Delay Queue?
0 - 900s
Messages in the Delay Queue remain invisible for the duration of the delay period (0 - 900s).
Describe SNS in 3 bullet points at a high-level.
- Messaging service.
- SNS is push-based.
- Think push notifications.
Describe SQS in 3 bullet points at a high-level.
- Messaging service.
- SQS is pull-based.
- Think polling the queue for messages.
What formats does SNS support?
- SMS text message
- SQS queues
- Any HTTP endpoint
What model does SNS use?
Pub-sub model whereby users subscribe to topics. Push mechanism, rather than a pull/poll mechanism.
What is Amazon SES?
Amazon Simple Email Service (SES)
Scalable and highly available email using a pay-as-you-go model delivered to an S3 bucket. Incoming emails can be used to trigger Lambda functions and SNS notifications.
SES Use Cases
Automated Emails
Online purchase/shipping/order status confirmations
Marketing Emails
All you need to know is the email address to start sending messages (not subscription based)
What is Fanout?
SNS can fanout messages to a large number of recipients, e.g. to multiple SQS queues, HTTP endpoints, and email addresses simultaneously).
What is Amazon Kinesis?
Kinesis is a family of services that’s all about analyzing streaming data in real-time.
Such as, financial transactions, stock prices, game data, social media feeds, location tracking data, IoT sensors, log files, etc.
What are the four core services in Kinesis?
- Kinesis Data Streams
- Kinesis Video Streams
- Kinesis Data Firehose (capture/transform/load data streams into AWS data stores for near-real-time analytics with BI tools)
- Kinesis Data Analytics (analyze/query/transform streamed data in real-time using SQL then store the results in AWS data stores like S3, Redshift or Elasticsearch)