Receiving events from a SaaS partner with Amazon EventBridge
To receive events from SaaS partner applications and services, you need a partner event source from the partner. A partner event source is a resource created by a partner that you can then accept as an event source. To accept the partner event source, you create a custom event bus and match it to the partner event source.
The following video covers SaaS integrations with EventBridge:
Topics
Supported SaaS partner integrations
EventBridge supports the following SaaS partner integrations:
Configuring Amazon EventBridge to receive events from a SaaS integration
Configuring EventBridge to receive partner events consists of two main steps:
Creating the partner event source
Associating that partner source with a partner event bus
Note
Any events published by a partner to a partner event source that has not been associated with an event bus will be immediately dropped. Those events will not be persisted at rest in EventBridge.
Create a partner event source (console only)
Open the Amazon EventBridge console at https://console.aws.amazon.com/events/
. -
In the navigation pane, choose Partner event sources.
-
Find the partner that you want and then choose Set up for that partner.
-
To copy your account ID to the clipboard, choose Copy.
-
In the navigation pane, choose Partner event sources.
-
Go to the partner's website and follow the instructions to create a partner event source using your account ID. The event source that you create is available to only your account.
Associate the partner source with a partner event bus (console)
-
In the EventBridge console, choose Partner event sources in the navigation pane.
-
Select the button next to the partner event source and then choose Associate with event bus.
The status of the event source changes from
PendingtoActive, and the name of the event bus updates to match the partner event source name. You can now start creating rules that match events from the partner event source.
Associate the partner source with a partner event bus (AWS CLI)
-
Use
create-event-busto create a partner event bus associated with the partner event source.Both
nameandevent-source-nameshould be set to the partner event source name.For example:
aws events create-event-bus \ --name "aws.partner/saas-integration/name" \ --event-source-name "aws.partner/saas-integration/name" \ --regionus-east-1After EventBridge creates the event bus, you can call
describe-event-sourceto return details about the partner source. TheStateof the partner source should beACTIVE.aws events describe-event-source --name "aws.partner/saas-integration/name"Note
Calling
put-permissionon a partner event bus returns an error. Only the partner account of the event source associated with the partner event bus is permitted to send events to it.
Associate the partner source with a partner event bus (AWS CloudFormation)
-
Create a AWS CloudFormation template that provisions an
AWS::Events::EventBusresource with the partner event source.Both
NameandEventSourceNameshould be set to the partner event source name. For example:AWSTemplateFormatVersion: 2010-09-09 Description: Cloudformation template to create Event Bus for receiving partner events Resources: ExamplePartnerEventBus: Type: AWS::Events::EventBus Properties: EventSourceName: 'aws.partner/saas-integration/name' Name: 'aws.partner/saas-integration/name' Use
cloudformation create-stackor the AWS CloudFormation console to create a stack from the template. For example:aws cloudformation create-stack --stack-nameeventbridge-saas--template-bodyfile://template.yml--regionus-east-1Note
Including an
AWS::Events::EventBusPolicyresource for the partner event bus in your template will result in an error. Only the partner account of the event source associated with the partner event bus is permitted to send events to it.