Kinesis stream processing
To handle Kinesis events (opens in a new tab), extend the KinesisHandler
class:
use Bref\Context\Context;
use Bref\Event\Kinesis\KinesisEvent;
use Bref\Event\Kinesis\KinesisHandler;
class Handler extends KinesisHandler
{
public function handleKinesis(KinesisEvent $event, Context $context): void
{
foreach ($event->getRecords() as $record) {
$data = $record->getData();
// do something
}
}
}
Learn more about using WebSockets in serverless.yml
in the Serverless Framework documentation (opens in a new tab).