Amazon EventBridge API Destinations to Zendesk

EventBridge rule → Connection → API

Create an EventBridge rule and API destination to route events to Zendesk

This pattern creates an API Destination for the Zendesk Put Tickets API. Once deployed, the pattern allows a user to send events easily through Event Bridge to Zendesk to create tickets. The pattern creates the following resources: Event Bridge Bus, Event Bridge Connection, Event Bridge API Destination, Event Bridge Rule, IAM Role, and SQS Queue.
The Event Bridge rule uses the API Destination and Connection as a target, SQS Queue as a DLQ, and the IAM role as its role. To send events go to the bus and send sample events. To create a ticket enter “MyTestMessage” for the detail type, “MyTestApp” for the source, the bus created by the pattern for the Event Bus Name, and any call that follows the format for the Zendesk PUT Tickets API as the detail (https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#create-ticket).
The following information is needed to use the pattern: (1) Zendesk Username and Password: To create the AUTH for the Event Bridge Connection (2) Zendesk Workspace: To construct the API Destination to the user’s workspace.
The IAM Role created by the pattern only has the permission to allow InvokeApiDestination access to the EventBridge Rule.
To work the user must have Password Access enabled in Zendesk (https://support.zendesk.com/hc/en-us/articles/4408836402074-Using-the-API-dashboard).

< 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 ./5-zendesksam deploy --guided


Testing

See the GitHub repo for detailed testing instructions.

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:

Omid Khan

Omid Khan

AWS Associate Solutions Architect