Unofficial VS Code Snippets for AWS Amplify

swyx - Jul 23 '20 - - Dev Community

AWS Amplify is a full stack serverless framework that helps frontend/mobile developers rapidly build with scalable AWS components. In the month-plus since joining AWS I have found myself needing to look up and copy and paste a bunch of code snippets from the docs. This is usually a sign that there's something to automate.

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 first), but it wasn't too hard to figure it out, especially when prototyping snippets with easy-snippet, recommended by Scott Tolinski.

The Snippets Extension

You can install it by looking for "Amplify VSCode Snippets" in the VS Code extensions tab, or click here.

image

You can look for a gif demo in the GitHub repo - it's 10mb so I'm not including it here for your bandwidth's sake.

Note: There is an older extension where you can find more snippets here.

Results

With these snippets, I was able to livecode 2 CRUD apps in 1 hour 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!

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .