Skip to content

dannysteenman/vscode-sam-snippets

Repository files navigation

AWS SAM Snippets for VS Code

Version Installs Rating

This extension adds YAML snippets for all AWS Serverless Application Model (SAM) resources into Visual Studio Code.

Tip

If you're looking for expertise to elevate your cloud infrastructure, then don't hesitate to get in touch with me!

📚 Discover more about us

Towards the Cloud is a one-person agency with over 9 years of extensive hands-on experience in architecting and building highly scalable distributed systems on AWS Cloud using Infrastructure as Code for startups and enterprises.

Maximize your development speed by harnessing our expertise in crafting high-performance Cloud infrastructures.

Why Choose Towards the Cloud?

  • Expertise in AWS CDK: Leverage the full power of AWS Cloud Development Kit (AWS CDK) with our deep expertise. We architect and build infrastructure as code (IaC) solutions that are maintainable, scalable, and fully automated.
  • Tailored Solutions: Your business is unique, and so are your cloud needs. We provide personalized consultations and solutions tailored to perfectly align with your project requirements and business goals.
  • Cost-Effective and Efficient: Benefit from our streamlined processes and deep AWS knowledge to optimize costs without compromising on performance or security.
  • One-on-One Attention: As a one-person agency, Towards the Cloud guarantees you receive dedicated support and expertise directly from an AWS Cloud Engineer. This ensures high-quality deliverables and swift decision-making.
  • Seamless CI/CD: Empower your team to manage infrastructure changes confidently and efficiently through Pull Requests, leveraging the full power of GitHub Actions.

Schedule introduction call


Features

  1. 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
  1. Includes intrinsic functions, conditions, and a variety of parameter types.
  2. Utilizes placeholders for quick navigation within the properties of each resource.
  3. Provides documentation links for each resource.
  4. 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).


AWS CloudFormation Snippets for VS Code

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