Architecture note4 lab guides4 lab guides
EventBridge · Event Bus
Rules, schemas, and the event that matches nothing at all.
Outcome
- Explain the three sources of EventBridge events
- Explain the standard event envelope (version, source, detail-type, detail)
- Write a rule that matches AWS service events and routes them to CloudWatch Logs
- Narrow a pattern to match on a specific
detailfield value - Explain why a resource policy is required on the CloudWatch Logs target
- Explain what happens to events dropped by a failed target without a DLQ
- Explain why application events should go on a custom bus, not
default - Create a custom event bus and put events onto it with
PutEvents - Explain the required fields of a PutEvents entry (Source, DetailType, Detail)
- Explain what happens when you omit
EventBusNamefrom a PutEvents call - Write rules that filter by source, detail-type, and detail field values
- Explain why application events should go on a custom bus, not
- Use
test-event-patternto validate patterns before creating rules - Write patterns using prefix, anything-but, numeric range, and exists operators
- Combine multiple operators in a single pattern (AND logic)
- Explain case sensitivity in event patterns and why it causes silent failures
- Explain why numeric patterns fail when the field value is a string
- Use
- Enable schema discovery on a custom event bus
- Register a schema manually using OpenAPI 3.0 format
- Create a new schema version and explain how versioning supports non-breaking evolution
- Explain the value of schema-first development in event-driven systems
- Explain EventBridge's at-least-once delivery guarantee and what it means for consumers
- Configure
MaximumRetryAttemptsandMaximumEventAgeInSecondson a target - Set up an SQS DLQ for a rule target and explain what information the DLQ message contains
- Name the four key EventBridge CloudWatch metrics and explain what each indicates
- Create a
FailedInvocationsalarm and explain why it's non-negotiable in production
- Explain why EventBridge → Lambda is push, not poll
- Add
lambda:InvokeFunctionresource-based policy for EventBridge - Read the EventBridge event envelope from inside a Lambda handler (
event['detail']) - Configure input transformer with
InputPathsMap+InputTemplate - Identify a missing resource policy from DLQ
AccessDeniedoutput
- Explain when EventBridge → SQS beats EventBridge → Lambda directly
- Apply an SQS queue policy allowing EventBridge
sqs:SendMessage - Explain the double-envelope when EventBridge → SNS → SQS and how to unwrap it
- Configure a FIFO SQS target with
MessageGroupIdand explain ordering guarantees
- Explain when EventBridge → SNS adds value over EventBridge multi-target rules
- Configure an SNS topic policy allowing EventBridge to publish
- Subscribe an SQS queue to SNS with the correct queue policy
- Explain why SNS filter policies with EventBridge require a Lambda intermediary
- Explain when event-triggered ECS task runs beat always-on ECS services
- Create an IAM role for EventBridge to assume for
ecs:RunTask - Explain why
iam:PassRoleis required for EventBridge → ECS but NOT for EventBridge → Lambda - Use input transformation to inject event data as container environment variable overrides
- Describe the fan-out pattern: one event, multiple targets, zero producer changes
- Identify a
PassRoleerror from DLQ output and state the exact fix
- Explain the two-role model: Scheduler Execution Role vs. Lambda Execution Role
- Identify the correct trust principal for each role (
scheduler.amazonaws.comvs.lambda.amazonaws.com) - Explain why swapping the trust principals causes silent failures at invocation time, not at creation time
- Explain the difference between
InvocationDroppedCount(IAM/ARN issue) andFailedInvocations(target error)
- Distinguish EventBridge Scheduler from EventBridge Event Bus and CloudWatch Events
- Write valid rate, cron, and one-time schedule expressions via CLI
- Explain why a 6-field cron is required (vs. 5-field in standard cron)
- Explain what happens to a one-time schedule after it fires
- Explain why Scheduler does not backfill past-due schedules
- Explain asynchronous invocation and why Lambda errors don't surface directly to Scheduler
- Configure
MaximumRetryAttemptsandMaximumEventAgeInSecondsand explain how they interact - Set up an SQS DLQ and explain what the DLQ message contains
- Explain why no DLQ means silent data loss after retry exhaustion
- Implement the Scheduler → Lambda → fetch(external API) bridge pattern
- Explain why idempotency is mandatory when calling external APIs from a scheduled Lambda
- Handle non-2xx responses by throwing (so Scheduler retries), not by returning silently
- Explain what happens when Lambda is in a VPC with no egress path
- Create timezone-aware schedules using IANA timezone strings
- Explain the UTC default and how it causes silent timezone bugs
- Configure flexible time windows and explain what they prevent
- Explain the
?vs.*day-of-month / day-of-week constraint in cron expressions
- Implement DynamoDB-based idempotency to handle at-least-once invocation
- Bulk-create schedules programmatically via CLI loop
- Create alarms on DLQ depth,
InvocationDroppedCount, and Lambda throttles - Explain the three failure layers and which metric covers each
- Calculate Scheduler invocation cost for a multi-tenant workload at scale