<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Pavel Vlasov</title>
    <description>The latest articles on DEV Community by Pavel Vlasov (@pavelvlasov).</description>
    <link>https://dev.to/pavelvlasov</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F90571%2F1ca5c74f-4c86-4171-a356-d5ab2cd53dde.jpeg</url>
      <title>DEV Community: Pavel Vlasov</title>
      <link>https://dev.to/pavelvlasov</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pavelvlasov"/>
    <language>en</language>
    <item>
      <title>Edit serverless YAML templates in VSCode like a pro</title>
      <dc:creator>Pavel Vlasov</dc:creator>
      <pubDate>Thu, 26 Sep 2019 11:16:52 +0000</pubDate>
      <link>https://dev.to/pavelvlasov/edit-serverless-yaml-templates-in-vscode-like-a-pro-4pkk</link>
      <guid>https://dev.to/pavelvlasov/edit-serverless-yaml-templates-in-vscode-like-a-pro-4pkk</guid>
      <description>&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;But there is a problem. No matter if you work with &lt;a href="https://serverless.com/" rel="noopener noreferrer"&gt;Serverless Framework&lt;/a&gt; or &lt;a href="https://github.com/awslabs/serverless-application-model" rel="noopener noreferrer"&gt;AWS SAM&lt;/a&gt; you have to deal with YAML and CloudFormation.&lt;/p&gt;

&lt;p&gt;And working with YAML is hard...&lt;/p&gt;

&lt;p&gt;How does the typical serverless application development cycle look like?&lt;/p&gt;

&lt;p&gt;Initialization&lt;br&gt;
You start with &lt;code&gt;serverless create&lt;/code&gt; or &lt;code&gt;sam init&lt;/code&gt; to put together a template.&lt;/p&gt;

&lt;h2&gt;
  
  
  Configuration
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;Go to google.com, type &lt;code&gt;DynamoDB Cloudformation&lt;/code&gt; hit &lt;code&gt;I'm Feeling Lucky&lt;/code&gt; open AWS Docs, and do a few &lt;code&gt;CMD+C/CMD+V&lt;/code&gt; into your template file.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deployment
&lt;/h2&gt;

&lt;p&gt;And now you are ready to deploy.&lt;/p&gt;

&lt;p&gt;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.&lt;br&gt;
Once everything is done you get the message about invalid CloudFormation template.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.kym-cdn.com%2Fphotos%2Fimages%2Foriginal%2F000%2F918%2F810%2Fa22.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.kym-cdn.com%2Fphotos%2Fimages%2Foriginal%2F000%2F918%2F810%2Fa22.jpg" alt="Oh snap!"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And you have to go to step 2 again.&lt;/p&gt;

&lt;p&gt;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.&lt;br&gt;
So I decided to build my own VSCode plugin.&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;

&lt;p&gt;I want to introduce you to &lt;a href="https://marketplace.visualstudio.com/items?itemName=ThreadHeap.serverless-ide-vscode" rel="noopener noreferrer"&gt;Serverless IDE&lt;/a&gt;. The most advanced VSCode plugin for AWS &lt;a href="https://aws.amazon.com/cloudformation/" rel="noopener noreferrer"&gt;CloudFormation&lt;/a&gt; and &lt;a href="https://docs.aws.amazon.com/lambda/latest/dg/serverless_app.html" rel="noopener noreferrer"&gt;SAM&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The project started as a hard fork of &lt;a href="https://github.com/redhat-developer/vscode-yaml" rel="noopener noreferrer"&gt;vscode-yaml&lt;/a&gt;, that eventually was mainly rewritten and tuned for better support of CloudFormation.&lt;/p&gt;

&lt;p&gt;The main capabilities are:&lt;/p&gt;

&lt;h2&gt;
  
  
  Smart autocompletion
&lt;/h2&gt;

&lt;p&gt;In addition to properties and values completion, the plugin supports smart snippets for AWS resources. It handles the &lt;code&gt;Globals&lt;/code&gt; template section in AWS SAM, so it will exclude fields that are already defined.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fthreadheap%2Fserverless-ide-vscode%2Fmaster%2Fpackages%2Fvscode%2Fdemo%2Fautocomplete.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fthreadheap%2Fserverless-ide-vscode%2Fmaster%2Fpackages%2Fvscode%2Fdemo%2Fautocomplete.gif" alt="ServerlessIDE autocompletion"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Go-to definitions and references
&lt;/h2&gt;

&lt;p&gt;You can navigate between resources by &lt;code&gt;CMD+hover&lt;/code&gt; over &lt;code&gt;!Ref&lt;/code&gt; intrinsic function references.&lt;/p&gt;

&lt;h2&gt;
  
  
  Validation
&lt;/h2&gt;

&lt;p&gt;Serverless IDE validates your template and highlights potential problems, including invalid resources references.&lt;br&gt;
In addition to that, it supports &lt;a href="https://github.com/aws-cloudformation/cfn-python-lint" rel="noopener noreferrer"&gt;cfn-lint&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fthreadheap%2Fserverless-ide-vscode%2Fmaster%2Fpackages%2Fvscode%2Fdemo%2Fvalidation.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fthreadheap%2Fserverless-ide-vscode%2Fmaster%2Fpackages%2Fvscode%2Fdemo%2Fvalidation.gif" alt="ServerlessIDE validation"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  AWS documentation at glance
&lt;/h2&gt;

&lt;p&gt;This one is my favorite. You can get easy access to AWS documentation right in the editor.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fthreadheap%2Fserverless-ide-vscode%2Fmaster%2Fpackages%2Fvscode%2Fdemo%2Fdocumentation.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fthreadheap%2Fserverless-ide-vscode%2Fmaster%2Fpackages%2Fvscode%2Fdemo%2Fdocumentation.gif" alt="ServerlessIDE documentation"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Limited &lt;a href="https://serverless.com/" rel="noopener noreferrer"&gt;Serverless Framework&lt;/a&gt; support
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fthreadheap%2Fserverless-ide-vscode%2Fmaster%2Fpackages%2Fvscode%2Fdemo%2Fserverless_framework.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fthreadheap%2Fserverless-ide-vscode%2Fmaster%2Fpackages%2Fvscode%2Fdemo%2Fserverless_framework.gif" alt="ServerlessIDE serverless framework support"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The source code is available on &lt;a href="https://github.com/threadheap/serverless-ide-vscode" rel="noopener noreferrer"&gt;github&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;/p&gt;




&lt;p&gt;Hi! My name is Pavel and I'm a creator of &lt;a href="https://marketplace.visualstudio.com/items?itemName=ThreadHeap.serverless-ide-vscode" rel="noopener noreferrer"&gt;ServerlessIDE&lt;/a&gt;.&lt;br&gt;
If you like the idea, give it a try!&lt;br&gt;
Found a bug? Raise an issue &lt;a href="https://github.com/threadheap/serverless-ide-vscode/issues" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;br&gt;
Have a suggestion or question? You can always &lt;a href="https://twitter.com/pvl4sov" rel="noopener noreferrer"&gt;DM me on twitter&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;The main image source: &lt;a href="https://unsplash.com/photos/tjX_sniNzgQ" rel="noopener noreferrer"&gt;https://unsplash.com/photos/tjX_sniNzgQ&lt;/a&gt;&lt;/p&gt;

</description>
      <category>serverless</category>
      <category>aws</category>
      <category>vscode</category>
      <category>cloudformation</category>
    </item>
  </channel>
</rss>
