Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

serverless-application-model

> DevOps
Open source

The AWS Serverless Application Model (AWS SAM) transform is a AWS CloudFormation macro that transforms SAM templates into CloudFormation templates.

9.6K stars0 likes1 views
WebsiteGitHub

About

The AWS Serverless Application Model (AWS SAM) transform is a AWS CloudFormation macro that transforms SAM templates into CloudFormation templates.

AWS SAM transform

The AWS Serverless Application Model (AWS SAM) transform is a AWS CloudFormation macro that transforms SAM templates into CloudFormation templates.

To use the SAM transform, add AWS::Serverless-2016-10-31 to the Transform section of your CloudFormation template.

Benefits of using the SAM transform include:

  • Built-in best practices and sane defaults.
  • Local testing and debugging with the AWS SAM CLI.
  • Extension of the CloudFormation template syntax.

Getting started

Save the following as template.yaml:

yaml
Transform: AWS::Serverless-2016-10-31
Resources:
  MyFunction:
    Type: AWS::Serverless::Function
    Properties:
      Runtime: nodejs24.x
      Handler: index.handler
      InlineCode: |
        exports.handler = async (event) => {
          console.log(event);
        }

And deploy it with the SAM CLI:

bash
sam sync --stack-name sam-app

The AWS::Serverless::Function resource will create a AWS Lambda function that logs events it receives.

Under the hood, the template is transformed into the JSON equivalent of the following CloudFormation template:

…

For a more thorough introduction, see the this tutorial in the Developer Guide.

Contributing

Setting up development environment

You'll need to have Python 3.8+ installed.

Create a virtual environment:

bash
python3 -m venv .venv
source .venv/bin/activate

Set up dependencies:

bash
make init

Run tests:

bash
make pr

See DEVELOPMENT_GUIDE.md for further development instructions, and CONTRIBUTING.md for the contributing guidelines.

Getting help

The best way to interact with the team is through GitHub. You can either create an issue or start a discussion.

You can also join the #samdev channel on Slack.

Learn more

Workshops and tutorials

  • The Complete AWS SAM Workshop
  • AWS Serverless Developer Experience Workshop
  • Deploying a "Hello, World!" application
  • Testing in the cloud using the SAM CLI

Documentation

  • SAM Developer Guide
  • SAM template specification
  • SAM connectors
  • SAM policy templates

Issues· 115 open

View all issuesOpen on GitHub
  • #3995

    AWS::Serverless::MicrovmImage.CodeUri has no default and no local-file support, making a required-parameter bootstrap deploy impossible

    Updated Sep 21, 2026
  • #1740

    EcsRunTaskPolicy should take ECS ARN, not task definition (family:revision)

    area/policy-templatestype/featuremaintainer/need-responseUpdated Sep 16, 2026
  • #3922

    [Feature Request] Add nodejs26.x runtime support to SAM specification

    type/featureUpdated Sep 3, 2026
  • #3979

    HttpApi: explicit AuthorizationScopes: [] is silently overridden by the authorizer's default scopes

    Updated Aug 14, 2026
  • #3977

    Implicit API: local PropagateTags: false is silently overridden by global PropagateTags: true

    Updated Aug 14, 2026
  • #3973

    transform() mutates the caller's template; transforming the same template twice fails

    Updated Aug 13, 2026
  • #3970

    SAM transform silently drops unrecognized CodeUri/ContentUri sub-properties despite schema declaring additionalProperties: false

    Updated Aug 5, 2026
  • #3820

    Lambda with AutoPublishAlias and AutoPublishAliasAllProperties does not create a new version when the referenced Parameter value changes

    stage/needs-triageUpdated Jul 31, 2026
  • #3794

    Enabling `BinaryMediaTypes` on `AWS::Serverless::Api` Base64-encodes request payload body

    stage/needs-triageUpdated Jul 31, 2026
  • #3791

    Feature: Support for `RetentionInDays` and `Retain` in `LoggingConfig` for `AWS::Serverless::Function`

    type/featurestage/needs-feedbackcontributors/welcomeUpdated Jul 20, 2026

> Tags

Pythonawsaws-samlambdasam

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 29, 2026
CategoryDevOps
PricingOpen source

> Related tools

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理