I want to troubleshoot the Amazon EventBridge rule that I created with AWS Command Line Interface (AWS CLI) or AWS CloudFormation.
Resolution
Note: If you receive errors when you run AWS CLI commands, then see Troubleshooting errors for the AWS CLI. Also, make sure that you're using the most recent AWS CLI version.
Confirm that you used the correct policy and permissions for your target
EventBridge uses resource-based policies and identity-based policies to manage access to target resources.
For a list of AWS services that use resource-based policies and their necessary permissions, see Using resource-based policies for Amazon EventBridge.
For identity-based policy permissions, see Permissions required for EventBridge to access targets using AWS Identity and Access Management (IAM) roles. For information about how to add policies to an IAM user, group, or role, see Adding and removing IAM identity permissions.
Note: You can use a resource-based or identity-based policy for Amazon API Gateway.
If your target is in another AWS account, AWS Region, or event bus, then see Permissions for event buses in Amazon EventBridge.
Review the FailedInvocations metrics for the EventBridge rule
If your policies and permissions are correct and you still experience failed invocations, then review the FailedInvocations metric to determine the cause.
Complete the following steps:
- Open the EventBridge console.
- In the navigation pane, under Buses, select Rules.
- Select the rule name.
- Choose the Monitoring tab.
- To review the FailedInvocations metrics, select the appropriate time in the dashboard.
Note: FailedInvocations shows permanently failed invocations that might be the result of incorrect permissions or a misconfigured target. For more information, see EventBridge metrics.
Add an Amazon SQS dead-letter queue to the target
You can also use a dead-letter queue (DLQ) in Amazon Simple Queue Service (Amazon SQS) as a target to store the event's metadata. Use the stored data to analyze why the EventBridge rule failed to invoke.
Related information
How can I troubleshoot issues with Amazon EventBridge rules?
Troubleshooting Amazon EventBridge
Sending and receiving events between AWS accounts in Amazon EventBridge
Sending and receiving events between AWS Regions in Amazon EventBridge