Posted On: Jun 26, 2023
The AWS Serverless Application Model (SAM) Command Line Interface (CLI) announces the launch of remote invoke command which enables developers to quickly invoke their AWS Lambda functions deployed to the AWS cloud. The AWS SAM CLI is a developer tool that makes it easier to build, test, package, and deploy serverless applications.
Customers can now use the SAM CLI to test a Lambda function with a simple command sam remote invoke. This command takes an event payload and Lambda logical id as input to invoke the Lambda function, then outputs the response. It supports multiple invocation modes such as response streaming, asynchronous invoke, dry run and request-response. Previously, customers had to use AWS Console or AWS CLI to test their Lambda functions. With this launch, SAM CLI users can use this feature along with sam sync command to speed up the build-deploy-test iteration loop.
This feature is available with SAM CLI version 1.88.0+. To learn more about this feature, please see the blogpost and documentation. You can install the latest version of the SAM CLI by following the instructions in the documentation.