Ch8 SQS, SWF and SNS Flashcards

1
Q
Which of the following is not a supported Amazon Simple Notification Service (Amazon
SNS) protocol?
A. HTTPS
B. AWS Lambda
C. Email-JSON
D. Amazon DynamoDB
A

D. Amazon DynamoDB is not a supported Amazon SNS protocol.

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

When you create a new Amazon Simple Notification Service (Amazon SNS) topic, which
of the following is created automatically?
A. An Amazon Resource Name (ARN)
B. A subscriber
C. An Amazon Simple Queue Service (Amazon SQS) queue to deliver your Amazon SNS
topic
D. A message

A

A. When you create a new Amazon SNS topic, an Amazon ARN is created automatically.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
Which of the following are features of Amazon Simple Notification Service (Amazon
SNS)? (Choose 3 answers)
A. Publishers
B. Readers
C. Subscribers
D. Topic
A

A, C, D. Publishers, subscribers, and topics are the correct answers. You have subscribers
to an Amazon SNS topic, not readers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
What is the default time for an Amazon Simple Queue Service (Amazon SQS) visibility
timeout?
A. 30 seconds
B. 60 seconds
C. 1 hour
D. 12 hours
A

A. The default time for an Amazon SQS visibility timeout is 30 seconds.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
What is the longest time available for an Amazon Simple Queue Service (Amazon SQS)
visibility timeout?
A. 30 seconds
B. 60 seconds
C. 1 hour
D. 12 hours
A

D. The maximum time for an Amazon SQS visibility timeout is 12 hours.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
Which of the following options are valid properties of an Amazon Simple Queue Service (Amazon SQS) message? (Choose 2 answers)
A. Destination
B. Message ID
C. Type
D. Body
A

B, D. The valid properties of an SQS message are Message ID and Body. Each message
receives a system-assigned Message ID that Amazon SQS returns to you in the
SendMessage response. The Message Body is composed of name/value pairs and the
unstructured, uninterpreted content.

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

You are a solutions architect who is working for a mobile application company that
wants to use Amazon Simple Workflow Service (Amazon SWF) for their new takeout
ordering application. They will have multiple workflows that will need to interact. What
should you advise them to do in structuring the design of their Amazon SWF
environment?
A. Use multiple domains, each containing a single workflow, and design the workflows
to interact across the different domains.
B. Use a single domain containing multiple workflows. In this manner, the workflows
will be able to interact.
C. Use a single domain with a single workflow and collapse all activities to within this
single workflow.
D. Workflows cannot interact with each other; they would be better off using Amazon
Simple Queue Service (Amazon SQS) and Amazon Simple Notification Service
(Amazon SNS) for their application.

A

B. Use a single domain with multiple workflows. Workflows within separate domains
cannot interact.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
In Amazon Simple Workflow Service (Amazon SWF), which of the following are actors?
(Choose 3 answers)
A. Activity workers
B. Workflow starters
C. Deciders
D. Activity tasks
A

A, B, C. In Amazon SWF, actors can be activity workers, workflow starters, or deciders.

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

You are designing a new application, and you need to ensure that the components of
your application are not tightly coupled. You are trying to decide between the different
AWS Cloud services to use to achieve this goal. Your requirements are that messages
between your application components may not be delivered more than once, tasks must
be completed in either a synchronous or asynchronous fashion, and there must be some
form of application logic that decides what do when tasks have been completed. What
application service should you use?
A. Amazon Simple Queue Service (Amazon SQS)
B. Amazon Simple Workflow Service (Amazon SWF)
C. Amazon Simple Storage Service (Amazon S3)
D. Amazon Simple Email Service (Amazon SES)

A

B. Amazon SWF would best serve your purpose in this scenario because it helps
developers build, run, and scale background jobs that have parallel or sequential steps.
You can think of Amazon SWF as a fully-managed state tracker and task coordinator in
the Cloud.

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

How does Amazon Simple Queue Service (Amazon SQS) deliver messages?
A. Last In, First Out (LIFO)
B. First In, First Out (FIFO)
C. Sequentially
D. Amazon SQS doesn’t guarantee delivery of your messages in any particular order.

A

D. Amazon SQS does not guarantee in what order your messages will be delivered.

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

Of the following options, what is an efficient way to fanout a single Amazon Simple
Notification Service (Amazon SNS) message to multiple Amazon Simple Queue Service
(Amazon SQS) queues?
A. Create an Amazon SNS topic using Amazon SNS. Then create and subscribe multiple
Amazon SQS queues sent to the Amazon SNS topic.
B. Create one Amazon SQS queue that subscribes to multiple Amazon SNS topics.
C. Amazon SNS allows exactly one subscriber to each topic, so fanout is not possible.
D. Create an Amazon SNS topic using Amazon SNS. Create an application that
subscribes to that topic and duplicates the message. Send copies to multiple Amazon
SQS queues.

A

A. Multiple queues can subscribe to an Amazon SNS topic, which can enable parallel
asynchronous processing.

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

Your application polls an Amazon Simple Queue Service (Amazon SQS) queue frequently
and returns immediately, often with empty ReceiveMessageResponses. What is one
thing that can be done to reduce Amazon SQS costs?
A. Pricing on Amazon SQS does not include a cost for service requests; therefore, there
is no concern.
B. Increase the timeout value for short polling to wait for messages longer before
returning a response.
C. Change the message visibility value to a higher number.
D. Use long polling by supplying a WaitTimeSeconds of greater than 0 seconds when
calling ReceiveMessage.

A

D. Long polling allows your application to poll the queue, and, if nothing is there,
Amazon Elastic Compute Cloud (Amazon EC2) waits for an amount of time you specify
(between 1 and 20 seconds). If a message arrives in that time, it is delivered to your
application as soon as possible. If a message does not arrive in that time, you need to
execute the ReceiveMessage function again.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
What is the longest time available for an Amazon Simple Queue Service (Amazon SQS)
long polling timeout?
A. 10 seconds
B. 20 seconds
C. 30 seconds
D. 1 hour
A

B. The maximum time for an Amazon SQS long polling timeout is 20 seconds.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q
What is the longest configurable message retention period for Amazon Simple Queue
Service (Amazon SQS)?
A. 30 minutes
B. 4 days
C. 30 seconds
D. 14 days
A

D. The longest configurable message retention period for Amazon SQS is 14 days.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q
What is the default message retention period for Amazon Simple Queue Service
(Amazon SQS)?
A. 30 minutes
B. 4 days
C. 30 seconds
D. 14 days
A

B. The default message retention period that can be set in Amazon SQS is four days.

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

Amazon Simple Notification Service (Amazon SNS) is a push notification service that lets
you send individual or multiple messages to large numbers of recipients. What types of
clients are supported?
A. Java and JavaScript clients that support publisher and subscriber types
B. Producers and consumers supported by C and C++ clients
C. Mobile and AMQP support for publisher and subscriber client types
D. Publisher and subscriber client types

A

D. With Amazon SNS, you send individual or multiple messages to large numbers of
recipients using publisher and subscriber client types.

17
Q

In Amazon Simple Workflow Service (Amazon SWF), a decider is responsible for what?
A. Executing each step of the work
B. Defining work coordination logic by specifying work sequencing, timing, and failure
conditions
C. Executing your workflow
D. Registering activities and workflow with Amazon SWF

A

B. The decider schedules the activity tasks and provides input data to the activity
workers. The decider also processes events that arrive while the workflow is in progress
and closes the workflow when the objective has been completed.

18
Q

Can an Amazon Simple Notification Service (Amazon SNS) topic be recreated with a
previously used topic name?
A. Yes. The topic name should typically be available after 24 hours after the previous
topic with the same name has been deleted.
B. Yes. The topic name should typically be available after 1–3 hours after the previous
topic with the same name has been deleted.
C. Yes. The topic name should typically be available after 30–60 seconds after the
previous topic with the same name has been deleted.
D. At this time, this feature is not supported.

A

C. Topic names should typically be available for reuse approximately 30–60 seconds
after the previous topic with the same name has been deleted. The exact time will depend
on the number of subscriptions active on the topic; topics with a few subscribers will be available instantly for reuse, while topics with larger subscriber lists may take longer.

19
Q

What should you do in order to grant a different AWS account permission to your
Amazon Simple Queue Service (Amazon SQS) queue?
A. Share credentials to your AWS account and have the other account’s applications
use your account’s credentials to access the Amazon SQS queue.
B. Create a user for that account in AWS Identity and Access Management (IAM) and
establish an IAM policy that grants access to the queue.
C. Create an Amazon SQS policy that grants the other account access.
D. Amazon Virtual Private Cloud (Amazon VPC) peering must be used to achieve this.

A

C. The main difference between Amazon SQS policies and IAM policies is that an
Amazon SQS policy enables you to grant a different AWS account permission to your
Amazon SQS queues, but an IAM policy does not.

20
Q

Can an Amazon Simple Notification Service (Amazon SNS) message be deleted after
being published to a topic?
A. Only if a subscriber(s) has/have not read the message yet
B. Only if the Amazon SNS recall message parameter has been set
C. No. After a message has been successfully published to a topic, it cannot be recalled.
D. Yes. However it can be deleted only if the subscribers are Amazon SQS queues.

A

C. No. After a message has been successfully published to a topic, it cannot be recalled.