There are thousands of different VS Code extensions available in the marketplace. As a beginner Cloud Engineer, it can be really tough to distinguish the good from the bad extensions.
I’ve tested more than hundreds of extensions for this blog post and curated my findings to a list that contains the 10 best VS Code extensions for Cloud Engineers to save your time.
Here are the 10 best VS Code extensions for Cloud Engineers:
Table of Contents
What are the best VS Code extensions for Cloud Engineers?
Here are my top picks for the best vs code extensions for Cloud Engineers that you should try out in your code editor.
1. Docker
The VS Code extension for Docker makes it easy for you to create and edit docker files. It contains a syntax highlighter, debugging options, tab completion (IntelliSense), and the ability to build containers within VS Code from the docker file.
As you can see in the example, the extension tries to tab-complete the commands that you want to add to the Dockerfile. You can test and build your Dockerfile by running the “Build image…” command (right-clicking the Dockerfile).
Now you can stay working in the VS Code editor instead of going back and forth between the terminal and editor.
Note: Make sure to install the official Docker Desktop app on your Mac or Windows computer before using this extension, otherwise the build command won’t work.
2. DotEnv
The DotEnv VS Code extension adds syntax highlight to .env variables. In my projects, I make a lot of use of .env variables (think of CI/CD pipelines).
Having syntax highlight on these files makes me less prone to mistakes and allows me to read the environment variables a lot quicker compared to a file with only grey text.
3. HashiCorp Terraform
Terraform is a pretty popular Infrastructure as Code (IaC) tool to build and deploy resources to the Cloud, therefore I’ve added this extension to the list.
The biggest features you get by enabling this extension are syntax highlighting and autocompletion for Terraform.
As the demo shows, terraform lists all available properties for the EC2 instance resource when we try to write expose the output.
The advantage of having such auto-completion is that you don’t need to constantly go back to the API docs to find out what properties a resource has before you can use it in your code.
4. Visual Studio IntelliCode
Visual Studio IntelliCode is an extension that provides AI-assisted code completion. In my opinion, this should become part of VS Code since every Cloud Engineer benefits from having code completion.
As you can see in the example demo, if a method or class contains interfaces then IntelliCode should be able to pick the references and will try to auto-complete it for the user as it’s typing the code.
5. AWS Toolkit
The AWS Toolkit extension makes interacting and building on AWS more productive and efficient. A couple of notable features include:
- AWS Explorer – Get instant access to an AWS Service in your account via VS Code e.g. view and execute AWS Lambda functions.
- CDK explorer – Get a tree view access on your AWS CDK App and see how the components are interconnected.
- Amazon CloudWatch Logs – You can view CloudWatch logs in near-real-time (load the most recent 10,000 lines) including their timestamps.
As you can see in the demo above, you can use the AWS Explorer to find resources in your active region and then view the contents directly in VS Code.
This can be a real-time-saver, as you don’t have to log in to the AWS Console and manually look for a specific AWS resource in order to view its results.
6. Sort Lines
The VS Code extension: sort lines does what the name suggests which is sorting lines in your files. As a Cloud Engineer when you’re writing a script that contains lists with AWS resources, it can be a real-time-saver if you can automatically sort items alphabetically for instance. You can sort your code in the following ways:
Command | Sort lines functionality |
---|---|
sortLines | Ascending, case-sensitive (default) |
sortLinesCaseInsensitive | Ascending, case-sensitive |
sortLinesCaseInsensitiveUnique | Unique ascending, case-sensitive |
sortLinesReverse | Descending, case-sensitive |
sortLinesLineLength | Line length ascending |
sortLinesLineLengthReverse | Line length descending |
sortLinesVariableLength | Variable-length ascending |
sortLinesVariableLengthReverse | Variable-length descending |
sortLinesNatural | Sorts alphabetically except groups with multi-digit numbers |
sortLinesUnique | Regular character code keeping only unique items |
sortLinesShuffle | Shuffles output |
removeDuplicateLines | Removes duplicate lines |
To invoke the Sort lines functionality type the following command
CMD + Shift + P -> Sort Lines
This will automatically list the options to sort your lines. My most used sort function in this extension is Natural
which sorts alphabetically but groups multi-digit numbers.
7. CloudFormation Snippets
CloudFormation Snippets is a VS Code extension that I developed and published on the VS Code marketplace myself! This extension adds auto-completion to all AWS resource properties.
As you can see in the demo, if you’re in a YAML file and start typing, the extension will try to suggest an AWS resource.
If you hit enter, it will auto-complete the AWS resource with all available properties. In this case, an S3 Bucket was generated including all of its properties.
Having auto-completion in the editor can save a lot of time because normally you’d have to manually look up the available properties in the official AWS resource and property types reference.
8. GitLens
If you’re developing Infrastructure as Code projects, then there’s a big chance you’re using git.
The VS Code extension GitLens improves the git functionality in VS Code. A couple of notable features that are worth mentioning are:
- git blame – shows who modified each line within a file
- git changes – highlights any local (unpublished) changes or lines changed by the most recent commit
- git revision navigation – shows the git history of a file and allows you to effortlessly navigate it
9. Git Graph
The Git Graph VS Code extension is unmissable if you’re a heavy git user.
This extension allows you to view your git commit history as a graph. You’ll get an instant overview of all previous commits, branches, tags, and users who committed the changes.
Additionally, it grants the user the ability to perform git actions such as commit, merge, revert, checkout, rebase, rename and reset branches.
Having the ability to do this from a single overview within VS Code improves productivity tremendously and doesn’t get you out of your flow.
10. Shell-format
Shell-format is a great utility extension that cleans up and formats your shell scripts nicely.
This is great for a Cloud Engineer since you’ll spend a lot of time creating various scripts to glue cloud components together.
Next to formatting your scripts, the extension also adds syntax highlighting so that you can easily identify the different parts of your shell script.
The extension supports the following file types for formatting:
Language | Extension |
---|---|
Shellscript | .sh .bash |
Dockerfile | Dockerfile |
Ignore file | .gitignore .dockerignore |
Properties | .properties |
Jvmoptions | .vmoptions , jvm.options |
Hosts | /etc/hosts |
Bats | .bats |
Conclusion
To summarize, as a Cloud Engineer it can be a daunting task to find the right VS Code extensions to improve your workflow and productivity.
Therefore I created this list containing the 10 best VS Code extensions for Cloud Engineers including Docker, AWS Toolkit, Hashicorp Terraform, DotEnv, Visual Studio IntelliCode, Sort lines, CloudFormation Snippet, Git Lens, Git Graph, and Shell-format.
You’ll notice that building resources in the Cloud go a lot quicker with the extensions that contain auto-completion and syntax highlighting.
If you’re interested in VS Code extensions for other programming languages. I wrote articles containing the best extensions for TypeScript, JavaScript, and Python.