5 Best VSCode Extensions for CloudFormation to Supercharge Your Workflow

As someone who has spent countless hours working on AWS CloudFormation templates, I have learnt that the right tool can make all the difference. That’s why, I am super excited today to share the 5 best VSCode extensions for CloudFormation to boost productivity and make your life easier as a developer.

So are you ready?

Let’s get started …

1. CloudFormation Linter

As the name suggests, CloudFormation Linter is an extension that uses cfn-lint to lint your CloudFormation templates. It’s a tool that checks your CloudFormation templates for potential errors, bugs, inconsistencies, and best practice violations.

By using this extension, you can significantly enhance the reliability and maintainability of your infrastructure as code

cfn-lint: An open-source tool maintained by AWS that provides extensive rule sets and customization options.

Features:

  • Parses your template with the help of cfn-lint and show any problem in the template.
  • Helps you identify and fix issues before deployment.
  • Allows you to view the template as a graph of resources
  • Improves your CloudFormation template quality by enforcing best practices and standards.
  • Helps identify potential security vulnerabilities hence enhancing your overall security posture.

Start Here: CloudFormation Linter

Note: I highly recommend you use this extension to enhance your CloudFormation workflows.

2. AWS CloudFormation Snippets

This VSCode extension for CloudFormation supercharges your CloudFormation template building with access to over 1250 ready-to-use JSON and YAML snippets for all AWS CloudFormation and SAM resources. It’s like having a personal assistant for crafting efficient cloud infrastructure.

Features:

  • Access over 1250+ CloudFormation and SAM resource snippets instantly.
  • Provides support for all nested properties of all resources.
  • Works with both YAML and JSON templates.
  • Provides an auto-complete feature.
  • Regularly refreshed/updated with CloudFormation’s latest features.

Start Here: AWS CloudFormation Snippets

3. CheckovPrismaless

CheckovPrismaless extension is a modified version of the original Bridgecrew extension (checkov) that no longer requires PrismaCloud API access.

In case you haven’t used Checkov, it is a static code analysis tool for infrastructure-as-code like CloudFormation, Terraform etc. However, it needs you to create a Bridgecrew account to get the API key and activate this extension. That’s where CheckovPrismaless comes to help.

CheckovPrismaless lets you perform Static Application Security Testing (SAST) in VSCode for CloudFormation, Terraform and container projects while offline. It also means you don’t need to configure any API keys to activate it.

Features:

  • It is a standalone version of checkov that lets you perform local scans without internet connectivity.
  • Enhances the security of your Infrastructure as Code
  • Covers security and compliance best practices of AWS especially CloudFormation.
  • Can detect AWS credentials in EC2 user data, Lambda environment variables etc.
  • Suggest fixes for misconfigured attributes.

Start Here: CheckovPrismaless

4. Cloudformation YAML Validator

This extension is a reference validator for AWS CloudFormation YAML files. Most of the time, I have seen people using YAML with Cloudformation for being more readable, less verbose and ease of use.

If you are also using YAML for your CloudFormation template, this extension is must have. Use this CloudFormation extension along with CloudFormation Linter and you are sorted to catch errors early.

Features

  • Triggers automatically when loading YAML or YML files

Warns you about-

  1. !Refs to nonexistent values
  2. !Subs with references to nonexistent values
  3. !Ifs referencing conditions that do not exist
  4. !FindInMaps referencing maps that do not exist
  5. AWS::CloudFormation::Stack parameters (with and without default values) missing values

Start Here: Cloudformation YAML Validator

5. AWS Toolkit for Visual Studio Code

The AWS Toolkit for Visual Studio Code is a powerful extension that significantly enhances your CloudFormation development experience. It provides a rich set of features to streamline the creation, management, and deployment of your CloudFormation stacks.

Features

  • Syntax highlighting, autocompletion, and validation for both JSON and YAML formats.
  • Provides code snippets for various resources to speed up development.
  • Create, update, delete, and view CloudFormation stacks.
  • Lets you deploy the CloudFormation template to AWS from VSCode itself.
  • Makes debugging/troubleshooting easier
  • Integrate well with other AWS services such as AWS Lambda, EC2, S3 etc.

Start Here: AWS Toolkit for Visual Studio Code

Note: This looks like a package deal to me while working with CloudFormation. More or less it provides all needed functionality.

Conclusion

In this post on the best VSCode extensions for CloudFormation, I shared with you 5 must-have VSCode extensions.

These extensions can help improve productivity and reduce errors when working with AWS CloudFormation in VSCode. Additionally, by using an extension like Checkov you will also improve the security posture of your Infrastructure as Code.

Also Read:

How to Deploy CloudFormation Template using AWS CLI