AWS SQS Flashcards

1
Q

What is SQS?

A

It is a message Q service.

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

What is the max size of an SQS message?

A

256KB

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

What is short and long polling?

A
  • Short is where you sample a subset of the servers and will receive message form just those servers.
  • Long poll is where you wait for the message to arrive. (1 - 20 sec)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

I have data larger than the 256KB limit on an SQS Q, how cna I deal with this larger data?

A

Put it in S3 and reference form message SQS

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

What is the two different Q types available?

A

Standard

FIFO

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

I need 1000 operation per second, what Q types should I use?

A

Standard Q are unlimited

FIFO are limited to 300 operations per second.

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

What is the visibility time out?

A

When you poll, the message becomes invisible and time starts, when the time expires the message will become visible again.

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

I what to have lambda be invoked with messages are in SQS Q, how can I do this?

A

This is a feature now available.

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

What is SQS good for?

A
  • It is good for acting as a buffer for incoming data to a Database
  • Decouple applications
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

I need to retain messages in an SQS Q for 10 days, do I need to make changes form the defaults?

A

Yes, the default is 4 days, you need to increase this to 10 days.

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

What is the max retention time for an SQS Q?

A

14 days

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

What is the default visibility time out?

A

30 sec, it cna be up to 12 hrs

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

What is the max visibility time out?

A

12hrs

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

What is a dead letter Q in SQS?

A

THis is where messages cannot be delivered, they are sent to a second Q.

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

My organization has a policy of encryption at rest, how can I ensure messages at rest are encrypted?

A

SQS has the option to encrypt messages at rest

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

When encrypting SQS messages at rest, what KMS key cna I use?

A

You select a CMK to use form AWS KMS

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

I need to store messages that are 2GB in size, I am writing my app and have flexibility, how can I do this?

A

There is an SDK that enables you to store 2GB messages, it does this by pushing the message to thS3 and then to SQS.

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

I am creating a loosely coupled architecture, what service can I use to decouple my application?

A

SQS

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

What is the difference between standard and FIFO Q?

A

Standard gives no guarantee of message order

FIFO gives first in first out.

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

What is Amazon MQ, is it SQS?

A

No amazon MQ is Apache MQ as a service by amazon.

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

When should I use SQS over Active MQ?

A

If the app is new it should be SQS, itf the app is coming from on-prem them it my be compatible with Apache MQ )( Amazon MQ)

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

What is the difference between SQS and SNS?

A

SQL is a message Q and SNS is for sending critical messages through a push to subscribed endpoints, like your mobile phone or email.

23
Q

What is the max length of the SQS Q?

A

Unllimited but has a 120K inflight limit and FIFO has 20K inflight limit.

24
Q

What is a dead letter queue?

A

This is the ability to create a separate queue of the SAME TYPE that will be used to place messages that are not processed by the main queue. Messages that reach the max number of maxReceiveCount, will be sent to the dead letter queue.

25
Q

Can I use s dead letter queue of a different type?

A

No

26
Q

What is the difference between standard AWS SQS queues and FIFO queues?

A
  • Standard queues are high throughput but not order to messages.
  • -Unlimited TPS
  • FIFO is ordered message delivery.
  • -Limited to 300 TPS
27
Q

I am enrolling students in an account, I have to select an SQS queue, I need to ensure the order to a number of actions that has to happen as part of the student enrolment, should I use standard or FIFO queues?

A

FIFO, as you need an order, FIFO will deliver messages ot the consumer in order.

28
Q

How cna I access SQS from my VPCover a private link?

A

You can create an SNS endpoint in your VPC and use this endpoint for connecting with the SQL topic over a private link between the VPC and the SQL.

29
Q

How cna I store an SQS message that is 1GB in size?

A

You store the data in S3 and reference it via an ID from SQS.

30
Q

What types of SQS polling can you have?

A
  • Short, samples a subset of servers and will not return all messages.
  • Will wait ( 1 - 20) until a message is available and will return it.
31
Q

How can I store 10MB message in relation to SQS?

A

You can only store 256KB in SQS, you would store in S3 and reference form a SQL message.

32
Q

Do I get ordering or messages with standard SQS?

A

No

33
Q

With standard SQS, are messages only delivered once?

A

No, you may get a message more than once and you have to have ways to deal with this.

34
Q

What are the advantages of using standard SQL over FIFO SQS?

A

You get to scale as large as you need.

35
Q

What are the advantages of SQS FIFO?

A

Ordered message delivery

36
Q

What are the disadvantages of SQS FIFO?

A

You are limited in scale, 300 operations a second, or 3K when optimal and messages deliver to the Q as batches.

37
Q

What is the visibility time out, explain?

A

When you pole for messages, the messages become invisible for the visibility time period, if you do not delete the message after processing, the message will become visible again.

38
Q

I wnat to replace my existing EC2 poling of SQS with serverless, what advantage will I get?

A

Lambda can get invoked automatically when a message is received, an advantage over poling.

39
Q

I am using autoscaling with my EC2 instances, how can I ensure the correct number of instance in the ASG are create?

A

You cna monitor the SQS Q size with CloudWatch and set alarms to expand and contract based on the number of messages in the SQS Q.

40
Q

What is the main advantage of using SQS ques when we are looking at several different parts of your application?

A

Decoupling

41
Q

What is the retention period for SQS?

A

Default 4 days and can be from 1min up to 14 days.

42
Q

What is delay delivery for SQS?

A

0 to 15min before the message becomes visible to any app using the SQS Q.

43
Q

What are the dead letter Q settings?

A
  • Enable

- Name of the dead letter Q

44
Q

My org requires thet all data in transit and at rest is encrypted, I am using SQS, what cna I do to ensure my org requirements are met?

A

SQS can encrypt using SSR.

45
Q

If I set the visibility time out to 30 sec and i place a message on the SQS Q and then retrieve the message using a short poll and then I keep calling the short poll, what will happen?

A

You will receive the message once after the first short pole and then the message will be invisible for 30 seconds and ne be received, after 30 seconds you will receive the message again ad it is not deleted, you have to explicitly call delete on the message.

46
Q

To delete a message what reference do you need?

A

ReceiptHandle is used when calling the delete message. The ReceiptHandle is returned with the message form a long or short poll.

47
Q

When I do a long pole, what am I doing in reference to SQS?

A

You are calling and waiting for X period for messages to be received.

48
Q

Explain the AWS Job Observer Pattern?

A

This is where we use CloudWatch to monitor the number of messages in the SQS Q and scale an EC2 autoscaling group based on the number of messages in the SQS Q.

49
Q

Explain SQS standard order?

A

Standard queues provide a loose-FIFO capability that attempts to preserve the order of messages. However, because standard queues are designed to be massively scalable using a highly distributed architecture, receiving messages in the exact order they are sent is not guaranteed

50
Q

When using FIFO, is order preserved?

A

Yes. FIFO (first-in-first-out) queues preserve the exact order in which messages are sent and received. If you use a FIFO queue, you don’t have to place sequencing information in your messages. For more information, see FIFO Queue Logic in the Amazon SQS Developer Guide.

51
Q

Dose standard SQS Q guarantee delivery?

A

Yes at least once, but can be more than once and you will have to deal with this in software.

52
Q

Dose FIFO SQS Q guarantee delivery?

A

Yes and only once

53
Q

I am using SQS and some of my messages take longer to process than the default visibility time out, what options do I have?

A

You can use the AWS SDK to adjust the visibility time out.

54
Q

I have to ensure my instance are able to keep up with the high numbers of messages incoming, the incoming messages goes down to a small number during the evening ad into the night. What is my best option?

A

Use cloudwatch alarms to watch the average number of messages and autoscaling policies to trigger the increase and decrease in instance sizes.