You have a CloudWatch Event rule that triggers a Lambda function. The Lambda function has a dead-letter queue (DLQ) configured. What is the behavior when the Lambda function invocation fails?
Think about how Lambda handles failures with DLQ configured in asynchronous invocation.
When a Lambda function is invoked asynchronously by CloudWatch Events and it fails, Lambda retries the invocation twice (total of three attempts). If it still fails, the event is sent to the configured DLQ.
You want to design an architecture using EventBridge and SQS to ensure that each event is processed exactly once by your application. Which setup achieves this?
Consider which SQS queue type supports deduplication and ordering to avoid duplicate processing.
SQS FIFO queues support exactly-once processing with message deduplication and ordering. Using EventBridge to send events to a FIFO queue ensures no duplicates and ordered processing.
To allow an EventBridge rule to invoke a Lambda function, which IAM permission must be granted?
Think about what permission allows a service to call a Lambda function.
EventBridge needs permission to invoke the Lambda function. This is done by granting the "lambda:InvokeFunction" permission to the EventBridge service principal on the Lambda function's resource policy.
Choose the correct EventBridge event pattern JSON that matches EC2 instance state changes when the state is either 'stopped' or 'terminated'.
Remember the syntax for matching multiple values in an array for a key in EventBridge event patterns.
EventBridge event patterns use arrays to match multiple values for a key. Option C correctly uses an array for the "state" key. Option C treats it as a string, A uses invalid syntax, and D repeats the same key twice which is invalid JSON.
You have an EventBridge rule with multiple targets including Lambda, SQS, and SNS. To avoid losing events if one target fails, what is the best practice?
Think about how to handle failures per target and ensure events are not lost.
Configuring a DLQ for each target ensures failed events are captured for later processing. Enabling retry policies helps EventBridge retry failed deliveries. This combination avoids event loss across multiple targets.