Serverless Framework 4.2.3 now supports AWS SAM and CloudFormation templates, simplifying AWS Lambda development. Deploy SAM/CF projects seamlessly, use Serverless Variables, and streamline your workflow. Perfect for organizations seeking to consolidate serverless tools and standardize development processes.
Get started with SAM and Cloudformation in Serverless Framework by reading the docs.
With this initial release, Serverless Framework enables you to deploy new or existing SAM or CloudFormation projects, without requiring modifications to your existing configuration files. Simply take your raw SAM or CF file in YAML or JSON, and the Serverless Framework will handle the deployment seamlessly.
Serverless Framework will auto-detect SAM/Cloudformation projects in template.yml
. You can also provide a custom template file name. We've enabled initial support for samconfig.toml
configuration properties that are specific to deployment.
Further, we've enabled support for Serverless Framework's popular Serverless Variables, enabling you to add them directly into SAM and CF syntax. Here are the Serverless Variables that are supported in SAM/CFN templates, with many more coming:
- AWS Account ID:
${aws:accountId}
- AWS Region:
${aws:region}
- AWS Stack Output:
${cf:anotherService.functionPrefix}
- CLI Options:
${opt:<option>}
- SLS Instance ID:
${sls:instanceId}
- Environment Variables:
${env:ENV_VAR}
- File:
${file(./myCustomFile.yml)}
- Git:
${git:<variable>}
- S3:
${s3:myBucket/myKey}
- SSM:
${ssm:/path/to/service/id}
Looking ahead, our focus will be on integrating SAM and CloudFormation templates into Serverless Compose files, allowing you to deploy traditional Serverless Framework, SAM, and CloudFormation projects together. Additionally, you will be able to set stage-based configuration Variables that all project files can inherit, as well as share security policies, observability configuration, and more—bringing you closer to a fully consolidated, streamlined workflow.
Best regards,
The Serverless Team