Posted On: Oct 3, 2023

Developers using SAM CLI to author their serverless application with Lambda functions can now create and use Lambda test events to test their function code. Test events are JSON objects that mock the structure of requests emitted by AWS services to invoke a Lambda function and return an execution result, serving to validate a successful operation or to identify errors. Previously, Lambda test events were only available in the Lambda console. With this launch, developers using SAM CLI can create and access a test event from their AWS account and share it with other team members.

This capability makes it easier for developers using SAM CLI to collaborate and streamline testing workflows. It also allows developers to use a consistent set of test events across their entire team. Developers can make test events available to other team members in their AWS account using granular IAM permissions.

Lambda Test Events is a capability based on Amazon EventBridge Schemas. Hence, this capability is available in the regions where AWS Lambda and Amazon EventBridge are available. For more information on availability, please see the AWS Region table.

To learn more about Lambda test event in SAM CLI, review our documentation.