# Unofficial VS Code Snippets for AWS Amplify

Original: https://swyx.io/unofficial-vs-code-snippets-for-aws-amplify-1959
Published: 2020-07-23

> making my own vs code snippets helpers for working with AWS Amplify

AWS Amplify is a [full stack serverless](https://www.oreilly.com/library/view/full-stack-serverless/9781492059882/) framework that helps frontend/mobile developers rapidly build with scalable AWS components. In the month-plus since [joining AWS](https://www.swyx.io/writing/hello-aws/) I have found myself needing to look up and copy and paste a bunch of code snippets from [the docs](https://docs.amplify.aws/cli). This is usually a sign that [there's something to automate](https://xkcd.com/1205/).

Amplify must accommodate multiple frontend frameworks and platforms so we can't lean on convention to save code - so the next best thing is to write snippets! I use VS Code so I wrote this set of snippets for myself. This is my first time making a snippets extension (so I needed to read [the extension docs](https://code.visualstudio.com/api/working-with-extensions/publishing-extension) first), but it wasn't too hard to figure it out, especially when prototyping snippets with [easy-snippet, recommended by Scott Tolinski](https://twitter.com/stolinski/status/1285605384191913991?s=20).

## The Snippets Extension

You can install it by looking for "Amplify VSCode Snippets" in the VS Code extensions tab, or [click here](https://marketplace.visualstudio.com/items?itemName=sw-yx.amplify-vscode-snippets).


![image](https://user-images.githubusercontent.com/6764957/88311465-7b199b00-cd43-11ea-8623-e56769e24197.png)


You can look for a gif demo in the [GitHub repo](https://github.com/sw-yx/amplify-vscode-snippets) - it's 10mb so I'm not including it here for your bandwidth's sake.

> Note: There is an [older extension](https://marketplace.visualstudio.com/items?itemName=aws-amplify.aws-amplify-vscode) where you can [find more snippets here](https://github.com/aws-amplify/amplify-js/wiki/VS-Code-Snippet-Extension#full-code-block-snippet-documentation).

## Results

With these snippets, I was able to [livecode 2 CRUD apps in 1 hour](https://www.youtube.com/watch?v=0Js5O5a4bQ4) in the recent ThisDotLabs JavaScript marathon! I'm still not too practiced yet, so it's not something I'm that proud of, but I feel a lot more productive already with them! 

You're welcome to [propose snippets or fork it for your own use](https://github.com/sw-yx/amplify-vscode-snippets)!
