EventBridge client

This page contains some example usage for EventBridge. There are other resources that explain authentication and configuration.

The EventBridge package could be installed with Composer.

composer require async-aws/event-bridge

Usage

Sends custom events

use AsyncAws\EventBridge\EventBridgeClient; use AsyncAws\EventBridge\Input\PutEventsRequest; use AsyncAws\EventBridge\ValueObject\PutEventsRequestEntry; $eventBridge = new EventBridgeClient(); $events = $eventBridge->putEvents(new PutEventsRequest([ 'Entries' => [ new PutEventsRequestEntry([ 'EventBusName' => 'marketing', 'Source' => 'acme.newsletter.campaign', 'DetailType' => 'UserSignUp', 'Detail' => json_encode(['email' => $userEmail]), ]) ], ])); echo 'Sent '. count($events->getEntries()) . ' events, with ' . $events->getFailedEntryCount() . ' failures';