AWS Serverless Application Model (SAM) Snippets for VS Code

This extension adds YAML snippets for all AWS Serverless Application Model (SAM) resources into Visual Studio Code.
[!TIP]
Towards the Cloud eliminates AWS complexity so you ship faster with confidence, cut costs by 30%, and become compliant.
Sounds too good to be true? We'll assess your AWS account for free and report exactly where you stand. You'll receive a report with security findings and cost optimization opportunities. After that you can decide whether to fix these findings yourself or let us handle it. No strings attached.

☁️ Discover how we cut AWS costs by 30% and accelerate SOC 2 compliance...
AWS complexity builds faster than you realize
What starts as a simple deployment quickly spirals into inefficient architectures that cost 40-60% more than needed, security blind spots that risk customer data, and teams that burnout from managing operations on AWS instead of building product.
Traditional consultancies prioritize billable hours over outcomes, then disappear after setup. We do the opposite...
We provide a complete package, so you deploy faster with confidence on AWS Cloud
- ✅ Compliant multi-account Landing Zone:
- Provisions AWS accounts with security guardrails out of the box - 100% CIS benchmark compliant
- Secure Single Sign-On (SSO) for clean user access management
- Everything is built using AWS CDK ensuring consistency, version control, and repeatable deployments
- See what features are already included in our landing zone on our public roadmap
- ✅ Off-the-shelf compliant CDK components: Develop secure infra quicker without reinventing the wheel
- ✅ Complete CI/CD with easy rollbacks: Deploy more frequently because of IaC safety
- ✅ Quarterly checks: Proactively receive Cost Optimization assessments + Security Reviews
- ✅ Fractional Cloud Engineer: On-demand access to a decade of AWS Cloud experience to help you use best practices
What results can you expect when you partner with us:
- 30% Lower AWS Bill: Proactive quarterly reviews catch overspending before it happens (30-60% documented savings)
- Accelerate SOC 2/HIPAA compliance: Our Landing Zone automatically sets up security guardrails on your AWS accounts with 100% CIS compliance from day one
- Easily stay compliant: Our automated monitoring and proactive quarterly security reviews give you control so yearly audits are smooth, not stressful
- Your Team Ships Faster: Our Pre-built secure infrastructure components let your team focus on product, not AWS
- Save on hiring costs: Access expert Cloud knowledge through our flexible retainer instead of committing to a full-time Cloud Engineer
Proof: Y Combinator startup Accolade's founder on how our Landing Zone accelerated their SOC 2 certification:
"Danny's solution and AWS expertise stood out with comprehensive accelerators, documentation, and clearly articulated design principles. We achieved a perfect security score in days, not months." — Galen Simmons, CEO
Features
- Adds support for the following SAM resource types:
AWS::Serverless::Api
AWS::Serverless::Application
AWS::Serverless::Connector
AWS::Serverless::Function
AWS::Serverless::GraphQLApi
AWS::Serverless::HttpApi
AWS::Serverless::LayerVersion
AWS::Serverless::SimpleTable
AWS::Serverless::StateMachine
- Includes intrinsic functions, conditions, and a variety of parameter types.
- Utilizes placeholders for quick navigation within the properties of each resource.
- Provides documentation links for each resource.
- Available on the Open VSX Registry for Gitpod support.
Usage
- Step 1. Install this extension
- Step 2. create a
.yml
file to start working on your AWS SAM project.
- Step 3. Check in the bottom right-hand corner of the VS Code editor that the file type is listed as "YAML".
- Step 4. To start with the basic template structure, type
sam
to get the YAML formatted template fragment.
- Step 5. Start adding resources in the resource section by using their prefix name e.g.
serverless-api
equals resource type AWS::Serverless::Api
Note: Once you start typing a prefix (explained in step 5), the corresponding snippet will show up in the dropdown menu. If this doesn't happen automatically, press ctrl + space
to invoke IntelliSense and search for the prefix of the resource type that you want to add (as listed in step 5).
If you use AWS CloudFormation to manage your infrastructure as code, check out the CloudFormation Snippets VS Code extension. This extension provides comprehensive coverage, including snippets for:
- All AWS CloudFormation resources
- All AWS Serverless Application Model (SAM) resource types
The snippets support both YAML and JSON CloudFormation templates, streamlining your infrastructure development workflow.
Key features include:
- Autocomplete by simply typing the resource name (e.g.,
ec2-instance
)
- Intrinsic functions, conditions, and a wide variety of parameter types
- Placeholders for quick navigation within each resource
- Inline documentation links for each resource
- Automatic weekly updates with the latest CloudFormation Resource Specification
Support
If you have a feature request or an issue, please let me know on Github
Author
Danny Steenman
