Send events to Amazon EventBridge global endpoints - Amazon SDK for PHP
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Send events to Amazon EventBridge global endpoints

You can use Amazon EventBridge global endpoints to improve the availability and reliability of your event-driven applications.

After the EventBridge global endpoint is set up, you can send events to it by using the SDK for PHP.


To use EventBridge global endpoints with the SDK for PHP, your PHP environment must have the Amazon Common Runtime (Amazon CRT) extension installed.

The following example uses the PutEvents method of the EventBridgeClient to send a single event to an EventBridge global endpoint.

<?php /* Send a single event to an existing Amazon EventBridge global endpoint. */ require '../vendor/autoload.php'; use Aws\EventBridge\EventBridgeClient; $evClient = new EventBridgeClient([ 'region' => 'us-east-1' ]); $endpointId = ''; // Existing EventBridge global endpointId. $eventBusName = 'default'; // Existing event bus in the us-east-1 Region. $event = [ 'Source' => 'my-php-app', 'DetailType' => 'test', 'Detail' => json_encode(['foo' => 'bar']), 'Time' => new DateTime(), 'Resources' => ['php-script'], 'EventBusName' => $eventBusName, 'TraceHeader' => 'test' ]; $result = $evClient->putEvents([ 'EndpointId' => $endpointId, 'Entries' => [$event] ]);

This blog post contains more information about EventBridge global endpoints.