SQS Flashcards

This deck aims to help retain concepts related to the SQS service.

1
Q

Which AWS service provides a secure, durable, and highly available hosted queue that can integrate and decouple distributed software systems and components?

A

Amazon Simple Queue Service (SQS)

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

What are the two types of queues supported by SQS?

A

Standard and FIFO

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

What is the maximum size of an SQS message?

A

256 KB, but messages can include links to larger data

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

If VisibilityTimeout is set both on an SQS queue and on an individual message, which setting takes priority?

A

The setting applied to the message

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

Which SQS attribute can be configured (either on the queue or per message) to handle error correction and automatic reprocessing?

A

VisibilityTimeout (0 seconds to 12 hours)

This attribute specifies the time required for message processing by the client, if processing fails, the message becomes available for retry after the VisibilityTimeout period

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

What action must a client explicitly perform after successfully processing an SQS message?

A

The client must delete the message from the queue

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

Where are problematic SQS messages typically redirected for further analysis?

A

To a Dead-Letter Queue, which is configured to retain unsuccessfully processed messages for further investigation

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

What is the common integration pattern between SQS and Auto Scaling Groups (ASG)?

A

ASG can scale based on the length of the SQS queue

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

What integration does SQS support for serverless message processing?

A

SQS can invoke AWS Lambda functions when messages appear in the queue

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

What is the common integration pattern between SQS and SNS?

A

Fanout architecture, where a message sent to an SNS topic is received by multiple SQS queues subscribed to that topic, triggering message processing

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

What polling types are supported by SQS?

A

Short-polling and Long-polling

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

Which polling type immediately consumes requests and returns 0-10 messages?

A

Short-polling

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

In which polling type is if messages are available on the queue they will be received, and if not the request will wait for specified waitTimeSeconds (up to 20sec) for messages to arrive?

A

Long-polling, the more cost-effective approach

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

Does SQS support server-side encryption?

A

Yes, SQS supports server-side encryption with AWS KMS for messages at rest and encryption in transit for messages transferred between SQS and clients

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

How is access to the SQS queue managed within AWS?

A

Through identity-based policies (within the same account) or resource-based policies (SQS Queue Policy) for access from external accounts

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

What is the billing model for the SQS service?

A

SQS is billed based on the number of requests, where one request can include 0-10 messages, and up to 64 KB of data

14
Q

Which SQS queue type is the best effort and may deliver messages out of order?

A

Standard

15
Q

Which SQS queue type guarantees at-least-once delivery?

A

Standard

15
Q

Which SQS queue type offers better scaling with near-unlimited Transactions Per Second (TPS)?

A

Standard

16
Q

Which SQS queue type is typically used for decoupling application components, worker pools, and batching for further processing?

A

Standard

16
Q

Which SQS queue type guarantees message order?

A

FIFO

17
Q

Which SQS queue type guarantees exactly-once delivery?

A

FIFO

18
Q

Which SQS queue type provides 3,000 messages per second with batching, and 300 messages per second without batching?

A

FIFO

19
Q

Which SQS queue type is used for workflow and command ordering?

A

FIFO

20
Q

What suffix must be included in the SQS queue name when creating a FIFO queue?

A

The .fifo suffix (e.g. orders.fifo)

21
Q

What trade-off is involved when choosing between SQS FIFO queues and SQS Standard queues?

A

Choosing FIFO queues sacrifices performance (compared to Standard queues) in favour of preserving message order

22
Q

What SQS attribute can be used to delay the delivery of new messages to consumers for several seconds?

A

DelaySeconds (0 seconds to 15 minutes) attribute delays message visibility in the queue for the specified period before the messages become visible

23
Q

If DelaySeconds is set both on the SQS queue and on an individual message, which setting takes priority?

A

The setting applied to the individual message

24
Q

Is DelaySeconds attribute supported on SQS FIFO queues?

A

No, DelaySeconds is not supported on FIFO queues

25
Q

Which AWS service is most suitable for implementing worker pools, decoupling, or asynchronous communication?

A

Amazon Simple Queue Service (SQS)

25
Q

What configurations should be set for an SQS queue to redirect failed messages to a Dead-Letter Queue (DLQ)?

A

Configure a re-drive policy

DLQ should generally have a longer retention period than the original queue, and an alarm can be set up to notify about messages delivered to the DLQ

26
Q

Which AWS service is the best choice when there is one producer group and one consumer group, with no need for persistence (messages are deleted after processing)?

A

Amazon Simple Queue Service (SQS)