Explain how SQS Extended Client works
Say you want to send a message through SQS of 1GB. How might you do this?
SQS Extended Client
Why is SQS Long Polling preferable to Short Polling?
increases efficiency and latency of the application by decreasing number of API calls made to SQS
What are the configuration limits for wait time for SQS Long Polling?
1-20 seconds, (but 20 seconds is preferred)
What is the name API-level field for configuring SQS Long Polling?
RecieveMessageWaitTimeSeconds
What does the SQS API call PurgeQueue do?
delete all messages in the queue
Suppose you are using an SQS/SNS fan-out pattern for an ordering service, but one of your SQS queues should only receive messages that are of the “placed” state. There are multiple SQS queues and you expect not all of your incoming messages will have a “placed” state. How can you implement this functionality?
Use SNS Message Filtering (aka fitler policies)
Suppose you want to send one S3 Event to many SQS queues. How can you do this in S3?
You cant do it in S3, because for each (event type, prefix) you can only have 1 S3 event rule
Instead Use SNS/SQS Fan-out (configure events to SNS)
Suppose you want to configure your messaging system to have ordering, deduplication, and fan-out. How can you accomplish this?
SNS FIFO Topic AND SQS FIFO Queue
Can Lambda subscribe to an SNS FIFO Topic?
NO
only SQS FIFO can subscribe to an SNS FIFO topic
What are the two methods for SQS FIFO deduplication?
MessageDeduplicationIDSuppose you have an SQS queue in one account and an EC2 instance in another account that needs to poll from that SQS queue. How can you configure this to happen?
Apply an SQS Queue Policy on the queue to give ReceiveMessage permissions to the account with the EC2 instance
Suppose you want to publish an S3 event notification to an SQS queue. You check the SQS queue but the messages are not showing up there. What might you need to do?
Configure an SQS Queue Policy on the queue to give SendMessage permissions to the S3 Bucket
Suppose you want to send one S3 Event to many SQS queues. How can you do this?
Use SNS/SQS Fan-out (configure events to SNS)
S3 Event -> SNS -(fan out) -> SQS queues
Recall: for each (event type, prefix) you can only have 1 S3 event rule
What is the name of the API Call you need to make to change the visibility timeout of an SQS queue?
ChangeMessageVisibility
What is the name of the API call an SQS queue makes after successfully processing a message?
DeleteMessage
What is primary purpose of the Partition Key when you execute a Put Record into Kinesis Data Sterams?
ensure ordering of similar records
Also records with the same parition key aer mapped to the same shard
What is the name of the API call used to retrieve data from a specific shard in Kinesis Data Streams?
GetRecords (after first calling GetShardIterator to locate the starting point).
In an SNS → SQS Fan-out setup, how do you prevent an SQS queue from receiving messages it doesn’t need?
Apply an SNS Filter Policy (or Message Filtering) to the SQS subscription, based on attributes in the SNS message.
How does a developer prevent failed messages from being lost when an SQS consumer fails to process a message repeatedly?
Configure a Dead-Letter Queue on the SQS queue, specifying a maxReceiveCount (the maximum number of times a message can be received before it’s moved to the DLQ).
What does DLQ stand for?
Dead Letter Queue
What is the key difference between SNS and EventBridge?
SNS can only filter/route based on metadata
EventBridge can filter/route based on any field in the structured JSON body
What AWS service is used to orchestrate complex, multi-step, stateful workflows involving multiple AWS services?
AWS Step Functions
What is the language used to define a Step Function workflow (State Machine)?
Amazon States Language (or ASL)