Skip to content

Why does my EventBridge rule that was created with AWS CLI or CloudFormation fail to invoke its target?

2 minute read
0

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:

  1. Open the EventBridge console.
  2. In the navigation pane, under Buses, select Rules.
  3. Select the rule name.
  4. Choose the Monitoring tab.
  5. 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

AWS OFFICIALUpdated 8 months ago