Creating an Event Relay means defining an EventRelayConfig that points a Salesforce event channel at your AWS account, then activating the partner event source in EventBridge. You can do this in the Setup UI or with the Tooling or Metadata API. The fields below describe the declarative path.
- Set up the AWS side first
In your AWS account, create an IAM role that trusts Salesforce and can write to EventBridge. Note the AWS account ID and the target region. You will reference these when you create the named credential.
- Create the named credential
In Setup, create a named credential that stores the AWS account ID and region for the relay. Several relays targeting the same account can reuse this one credential rather than each defining its own.
- Create the event relay
Open the Event Relays page in Setup. Select the named credential, the event channel to relay, and an error recovery option. Save the relay; it is created in a stopped state so nothing is delivered yet.
- Associate the partner event source in AWS
Salesforce registers a partner event source in EventBridge in a pending state. In the AWS console, find that source and associate it with the event bus you want to receive the events.
- Start the relay and verify
Change the relay state to running. Publish a test event in Salesforce and confirm it reaches the EventBridge bus, for example by attaching a simple Lambda or CloudWatch logging rule.
The credential holding your AWS account ID and region. It backs the trust link Salesforce uses to assume the IAM role and write to EventBridge.
The platform event or Change Data Capture channel whose events the relay forwards. One relay handles one channel.
Controls how the relay resumes after an error: replay retained events from where it stopped, or skip ahead to the latest position.
The run state of the relay. New relays start stopped; you move the relay to running to begin delivery and can stop it again later.
- The IAM role trust relationship is the most common failure point. A wrong account ID, region, or role policy blocks delivery silently, so verify it in a sandbox first.
- Events do not flow until you associate the partner event source with an event bus in the AWS console. Creating the relay in Salesforce alone is not enough.
- Choose the error recovery option deliberately. Resuming from the latest position skips events that occurred during an outage, which may break a data sync that expects every change.
- Events outside the channel retention window cannot be replayed. A relay stopped for too long may miss events that have already aged out of the channel.