AWS Application Integration Services — Questions and Answers
Question 1: Which Amazon SQS queue type guarantees that messages are delivered in the exact order they are sent and that each message is processed exactly once?
- Standard Queue
- FIFO Queue (Correct answer)
- Dead-Letter Queue
- Delay Queue
Correct answer: FIFO Queue
FIFO (First-In, First-Out) queues preserve message order and provide exactly-once processing using message deduplication IDs. Standard queues offer higher throughput but provide at-least-once delivery and best-effort ordering.
Question 2: A company wants to fan out a single event notification to multiple subscriber endpoints simultaneously (email, SQS, Lambda, HTTP). Which AWS service is the best fit?
- Amazon SQS
- Amazon SNS (Correct answer)
- Amazon EventBridge
- AWS Step Functions
Correct answer: Amazon SNS
Amazon SNS (Simple Notification Service) is a pub/sub messaging service that can push a single message to multiple subscribers—including email, SMS, SQS queues, Lambda functions, and HTTP endpoints—simultaneously. SQS is for point-to-point queuing, EventBridge routes events from sources to targets, and Step Functions orchestrates workflows.
Question 3: What happens to a message in an Amazon SQS standard queue if a consumer retrieves it but does not delete it before the visibility timeout expires?
- It is permanently deleted from the queue
- It is moved to the Dead-Letter Queue immediately
- It becomes visible again and can be processed by another consumer (Correct answer)
- It is archived to Amazon S3
Correct answer: It becomes visible again and can be processed by another consumer
During the visibility timeout, a message is hidden from other consumers to prevent duplicate processing. If the consumer fails to delete the message before the timeout expires, SQS makes the message visible again so another consumer can process it. It only goes to the Dead-Letter Queue after exceeding the configured maximum receive count.
Question 4: Amazon EventBridge (formerly CloudWatch Events) uses 'rules' to route events. What is the primary mechanism a rule uses to match incoming events?
- SQL-like query strings
- Event patterns (JSON pattern matching against event fields) (Correct answer)
- Regular expressions against the event body
- XPath expressions against the event XML
Correct answer: Event patterns (JSON pattern matching against event fields)
EventBridge rules use event patterns—JSON objects that match against specific fields of incoming events (e.g., source, detail-type, account, region). When an event matches the pattern, the rule routes it to one or more targets such as Lambda, SQS, or Step Functions.
Question 5: Which AWS service is best suited for coordinating a multi-step, long-running business workflow that includes human approval steps, error handling, and retries across multiple AWS services?
- Amazon SQS
- Amazon SNS
- AWS Step Functions (Correct answer)
- Amazon EventBridge Pipes
Correct answer: AWS Step Functions
AWS Step Functions is a serverless orchestration service that lets you model workflows as state machines using Amazon States Language. It natively supports sequential and parallel execution, retries, error catching, wait states for human approvals (via task tokens), and integration with dozens of AWS services.
Question 6: What is the maximum message retention period for an Amazon SQS queue?
- 1 day
- 4 days (default)
- 14 days (Correct answer)
- 30 days
Correct answer: 14 days
SQS retains messages for a configurable period between 1 minute and 14 days. The default retention period is 4 days. Messages that are not consumed and deleted within the retention period are automatically deleted by SQS.
Which Amazon SQS queue type guarantees that messages are delivered in the exact order they are sent and that each message is processed exactly once?