I am a huge fan of serverless technologies and AWS Lambda in particular. It is just incredible how simple it is to build reliable and scalable infrastructures so fast.
And working with YAML is hard…
How does the typical serverless application development cycle look like?
You start with
serverless create or
sam init to put together a template.
Then add a couple of lambda functions, DynamoDB table maybe. Oh, you probably forgot how to create a DynamoDB stream or how to enable server-side encryption. So you need to open docs.
Go to google.com, type
DynamoDB Cloudformation hit
I'm Feeling Lucky open AWS Docs, and do a few
CMD+C/CMD+V into your template file.
And now you are ready to deploy.
At this stage, the deployment framework will compile your code, put everything together into a zip archive and then send it over a network to AWS. It is a quite time-consuming task and might take a while. Once everything is done you get the message about invalid CloudFormation template.
And you have to go to step 2 again.
I have been struggling with it for a while. I explored multiple options and VSCode plugins but could not find a solution that will satisfy my needs. So I decided to build my own VSCode plugin.
The project started as a hard fork of vscode-yaml, that eventually was mainly rewritten and tuned for better support of CloudFormation.
The main capabilities are:
In addition to properties and values completion, the plugin supports smart snippets for AWS resources. It handles the
Globals template section in AWS SAM, so it will exclude fields that are already defined.
Go-to definitions and references
You can navigate between resources by
!Ref intrinsic function references.
Serverless IDE validates your template and highlights potential problems, including invalid resources references. In addition to that, it supports cfn-lint.
AWS documentation at glance
This one is my favorite. You can get easy access to AWS documentation right in the editor.
Limited Serverless Framework support
The plugin provides limited serverless framework support but its external imports are not supported just yet, and some use-cases with plugins might not be supported as well.
The source code is available on github.
Thanks for reading!
Hi! My name is Pavel and I’m a creator of ServerlessIDE.
If you like the idea, give it a try!
Found a bug? Raise an issue here.
Have a suggestion or question? You can always DM me on twitter.
The main image source: unsplash