An open API service indexing awesome lists of open source software.

https://github.com/dannysteenman/vscode-sam-snippets

This extension adds AWS SAM snippets into Visual Studio Code.
https://github.com/dannysteenman/vscode-sam-snippets

amazon-web-services aws aws-sam cloudformation sam serverless snippets vscode vscode-extension vscode-snippets yaml

Last synced: about 1 year ago
JSON representation

This extension adds AWS SAM snippets into Visual Studio Code.

Awesome Lists containing this project

README

          

# AWS Serverless Application Model (SAM) Snippets for VS Code

[![](https://img.shields.io/visual-studio-marketplace/v/dannysteenman.sam-snippets?color=374151&label=Visual%20Studio%20Marketplace&labelColor=000&logo=visual-studio-code&logoColor=0098FF)](https://marketplace.visualstudio.com/items?itemName=dannysteenman.sam-snippets)
[![](https://img.shields.io/visual-studio-marketplace/v/dannysteenman.sam-snippets?color=374151&label=Open%20VSX%20Registry&labelColor=000&logo=data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2aWV3Qm94PSI0LjYgNSA5Ni4yIDEyMi43IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxwYXRoIGQ9Ik0zMCA0NC4yTDUyLjYgNUg3LjN6TTQuNiA4OC41aDQ1LjNMMjcuMiA0OS40em01MSAwbDIyLjYgMzkuMiAyMi42LTM5LjJ6IiBmaWxsPSIjYzE2MGVmIi8+CiAgPHBhdGggZD0iTTUyLjYgNUwzMCA0NC4yaDQ1LjJ6TTI3LjIgNDkuNGwyMi43IDM5LjEgMjIuNi0zOS4xem01MSAwTDU1LjYgODguNWg0NS4yeiIgZmlsbD0iI2E2MGVlNSIvPgo8L3N2Zz4=&logoColor=0098FF)](https://open-vsx.org/extension/dannysteenman/sam-snippets)
[![Installs](https://img.shields.io/visual-studio-marketplace/i/dannysteenman.sam-snippets 'Currently Installed')](https://marketplace.visualstudio.com/items?itemName=dannysteenman.sam-snippets)
[![Rating](https://img.shields.io/visual-studio-marketplace/stars/dannysteenman.sam-snippets)](https://marketplace.visualstudio.com/items?itemName=dannysteenman.sam-snippets)

This extension adds YAML snippets for **all** [AWS Serverless Application Model (SAM) resources](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-specification-resources-and-properties.html) into Visual Studio Code.

> [!TIP]
> Struggling with AWS complexity or stuck on-premise? Let's transform your cloud journey.
>
> [Schedule a call with me](https://towardsthecloud.com/contact) to find out how I can enhance your existing AWS setup or guide your journey from on-premise to the Cloud.
>
> ☁️ Discover more about my one-person business: Towards the Cloud
>
>

>
> Hi, I'm Danny – AWS expert and founder of [Towards the Cloud](https://towardsthecloud.com). With over a decade of hands-on experience, I specialized myself in deploying well-architected, highly scalable and cost-effective AWS Solutions using Infrastructure as Code (IaC).
>
> #### When you work with me, you're getting a package deal of expertise and personalized service:
>
> - **AWS CDK Proficiency**: I bring deep AWS CDK knowledge to the table, ensuring your infrastructure is not just maintainable and scalable, but also fully automated.
> - **AWS Certified**: [Equipped with 7 AWS Certifications](https://www.credly.com/users/dannysteenman/badges), including DevOps Engineer & Solutions Architect Professional, to ensure best practices across diverse cloud scenarios.
> - **Direct Access**: You work with me, not a team of managers. Expect quick decisions and high-quality work.
> - **Tailored Solutions**: Understanding that no two businesses are alike, I Custom-fit cloud infrastructure for your unique needs.
> - **Cost-Effective**: I'll optimize your AWS spending without cutting corners on performance or security.
> - **Seamless CI/CD**: I'll set up smooth CI/CD processes using GitHub Actions, making changes a breeze through Pull Requests.
>
> *My mission is simple: I'll free you from infrastructure headaches so you can focus on what truly matters – your core business.*
>
> Ready to unlock the full potential of AWS Cloud?
>
> Schedule your call
>

---
## Features

1. Adds support for the following SAM resource types:

```YAML
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
```

2. Includes intrinsic functions, conditions, and a variety of parameter types.
3. Utilizes placeholders for quick navigation within the properties of each resource.
4. Provides documentation links for each resource.
5. Available on the [Open VSX Registry](https://open-vsx.org/extension/dannysteenman/sam-snippets) 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](https://marketplace.visualstudio.com/items?itemName=dannysteenman.cloudformation-yaml-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](https://github.com/dannysteenman/vscode-sam-snippets/issues)

## Author

[Danny Steenman](https://towardsthecloud.com/about)

[![](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/dannysteenman)
[![](https://img.shields.io/badge/X-000000?style=for-the-badge&logo=x&logoColor=white)](https://twitter.com/dannysteenman)
[![](https://img.shields.io/badge/GitHub-2b3137?style=for-the-badge&logo=github&logoColor=white)](https://github.com/dannysteenman)