Converting Lambda Functions to Amazon SAM Applications
If you have a function in the Lambda console that you want to manage in VS Code as infrastructure as code (IaC), you can transfer it to VS Code and then convert it to an Amazon SAM template. With your function converted to an Amazon SAM template, you can control the versioning of your infrastructure, automate deployments, remotely debug functions, and maintain consistent environments across your development lifecycle. With local and remote debugging capabilities, you can also troubleshoot issues more effectively by stepping through your code, inspecting variables, and setting breakpoints both locally and in the Amazon cloud.
For instructions on moving your functions from the console and setting up local development, see Developing Lambda functions locally with VS Code in the Amazon Lambda Developer Guide. Follow these instructions to move a Lambda function from the console to VS Code and then convert it to an Amazon SAM template. After doing this, you can:
-
Remotely debug your function in the Amazon cloud. For details, see Remotely debug Lambda functions with VS Code in the Amazon Lambda Developer Guide.
-
Manage associated resources and permissions as infrastructure as code. For details, see Using Lambda with infrastructure as code (IaC) in the Amazon Lambda Developer Guide
-
Deploy and update your application using the Amazon SAM CLI. For details, see Amazon SAM CLI.
-
Visually design your serverless architecture using Infrastructure Composer. For details, refer to the Infrastructure Composer Developer Guide.
Learn more
To continue learning about Amazon SAM, see the following resources:
-
The Complete Amazon SAM Workshop
– A workshop designed to teach you many of the major features that Amazon SAM provides. -
Sessions with SAM
– Video series created by our Amazon Serverless Developer Advocate team on using Amazon SAM. -
Serverless Land
– Site that brings together the latest information, blogs, videos, code, and learning resources for Amazon serverless.