Create an EventBridge scheduled rule that invokes a Lambda function every minute, verify execution in CloudWatch Logs, and clean up.
https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-get-started.html
- ID: eventbridge/getting-started
- Phase: create
- Complexity: beginner
- Core actions: events:PutRule, events:PutTargets
- Creates an IAM execution role for Lambda
- Creates a Node.js Lambda function that logs EventBridge events
- Creates an EventBridge rule with a
rate(1 minute)schedule - Grants EventBridge permission to invoke the function
- Adds the Lambda function as the rule target
- Waits for the rule to fire and verifies output in CloudWatch Logs
bash amazon-eventbridge-gs.shTo auto-run with cleanup:
echo 'y' | bash amazon-eventbridge-gs.sh- EventBridge rule (scheduled, rate 1 minute)
- Lambda function (Node.js 22)
- IAM role (with AWSLambdaBasicExecutionRole policy)
- CloudWatch log group (created automatically by Lambda)
- Run: ~90 seconds (includes 65s wait for rule to fire)
- Cleanup: ~5 seconds
Free tier eligible. Lambda and EventBridge invocations stay well within free tier limits for this tutorial.