Amazon EventBridge API Destinations with OAuth credentials

EventBridge rule → Connection → API

Create an EventBridge rule and API Destination with OAuth credentials

This pattern configures an EventBridge rule that routes to an API Destinations target using Oauth credentials. It configures a Connection, which contains the authorization for the API endpoint, and the API, which contains the URL, http method, and other configuration information.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/eventbridge-api-destinations

Deploy

cd ./11-oath-apisam deploy --guided


Testing

1. From a command line in this directory, send a test event to EventBridge simulating a "Payment success" event: aws events put-events --entries file://testEvent.json

Cleanup

1. Delete the stack: sam delete --stack-name STACK_NAME.
2. Confirm the stack has been deleted: aws cloudformation list-stacks --query "StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus"

Created by:

Gokul Sarangaraju

Gokul Sarangaraju

Senior Solutions Architect at Amazon Web Services (AWS)

Follow on LinkedIn