Posted On: Apr 29, 2021

The AWS Serverless Application Model (SAM) CLI now supports AWS Cloud Development Kit (CDK) applications, as a public preview. The AWS SAM CLI is a developer tool that makes it easier to build, locally test, package, and deploy serverless applications.

CDK users can now use the SAM CLI to directly test an AWS Lambda function and an API Gateway endpoint from their CDK application locally, without manually synthesizing the application or passing additional options to either CLI. Additionally, CDK users can use the SAM CLI to build serverless applications defined using CDK. Because AWS SAM works within the CDK project structure, users can still use the CDK CLI for creating, modifying, and deploying CDK applications.

To learn more about the SAM CLI and CDK integration see the announcement blog post on the Compute blog. You can install the SAM CLI by following the instructions in the documentation. SAM users can install CDK using npm.