Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

License

NotificationsYou must be signed in to change notification settings

aws/serverless-application-model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

TestsUpdate schemaPyPIPyPI - Python VersionContribute with Gitpod

TheAWS Serverless Application Model (AWS SAM) transform is aAWS CloudFormation macro that transformsSAM templates intoCloudFormation templates.

To use the SAM transform, addAWS::Serverless-2016-10-31 to theTransform section of your CloudFormation template.

Benefits of using the SAM transform include:

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

Getting started

Save the following astemplate.yaml:

Transform:AWS::Serverless-2016-10-31Resources:MyFunction:Type:AWS::Serverless::FunctionProperties:Runtime:nodejs18.xHandler:index.handlerInlineCode:|        exports.handler = async (event) => {          console.log(event);        }

And deploy it with theSAM CLI:

sam sync --stack-name sam-app

TheAWS::Serverless::Function resource will create aAWS Lambda function that logsevents it receives.

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

Resources:MyFunction:Type:AWS::Lambda::FunctionProperties:Code:ZipFile:|          exports.handler = async (event) => {            console.log(event);          }Handler:index.handlerRole:!GetAtt MyFunctionRole.ArnRuntime:nodejs18.xTags:        -Key:lambda:createdByValue:SAMMyFunctionRole:Type:AWS::IAM::RoleProperties:AssumeRolePolicyDocument:Version:"2012-10-17"Statement:          -Action:              -sts:AssumeRoleEffect:AllowPrincipal:Service:                -lambda.amazonaws.comManagedPolicyArns:        -arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRoleTags:        -Key:lambda:createdByValue:SAM

For a more thorough introduction, see thethis tutorial in theDeveloper Guide.

Contributing

Setting up development environment

You'll need to have Python 3.8+ installed.

Create avirtual environment:

python3 -m venv .venvsource .venv/bin/activate

Set up dependencies:

make init

Run tests:

make pr

SeeDEVELOPMENT_GUIDE.md for further development instructions, andCONTRIBUTING.md for the contributing guidelines.

Getting help

The best way to interact with the team is through GitHub. You can eithercreate an issue orstart a discussion.

You can also join the#samdev channel on Slack.

Learn more

Workshops and tutorials

Documentation

About

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

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Languages


[8]ページ先頭

©2009-2025 Movatter.jp