News

GitHub Codespaces Alternative: AWS Cloud9, SSH & VS Code

Amazon Web Services offers up a remote development setup for Visual Studio Code developers that involves an SSH connection to leverage the AWS Cloud9 IDE and other functionality.

Although not specifically characterized as such, it can be seen as an alternative setup to GitHub Codespaces, which provides cloud-powered development environments that can leverage computing resources -- CPU, memory, storage and so on -- that are sometimes not available on underpowered local machines.

Over at AWS, Nick Ragusa, a VS Code aficionado, has a similar idea.

"One of the things I appreciate most about Visual Studio Code is its vast ecosystem of extensions, allowing me to extend its core functionality to exactly how I need it. I've spent hours installing (and sometimes subsequently removing) extensions, figuring out the keyboard shortcut combinations but it's the theme and syntax highlighter that I find the most appealing. Despite all of this time invested in building the perfect IDE, it can still fall somewhat short.

"One of the hardest challenges to overcome, regardless of IDE, is the fact that it's confined to the hardware that it's installed on," continued Ragusa, a senior solutions architect on the EDU team at AWS, in a July 1 blog post. "Some of these challenges include running out of local disk space, RAM exhaustion, or requiring more CPU cores to process a build. In this blog post, I show you how to overcome the limitations of your laptop or desktop by using AWS Cloud9 to power your Visual Studio Code IDE."

His solution seeks to overcome problems such as timeouts and connection resets experienced while mounting a remote file system via SSH (Secure Shell Protocol). Instead, he strives for a solution in which developers can:

  • Use SSH to connect to a remote instance, install favorite extensions on the remote instance, and take advantage of the remote machine's resources including CPU, disk, RAM, and more.
  • Access the instance without needing to open security groups and ACLs from an (often changing) desktop IP.
  • Leverage existing AWS infrastructure including VPC, IAM user/role and policies, and take advantage of AWS Cloud9 to power a remote instance.

So the architecture for that would look like this:

Architecture to Use AWS Cloud9 to Power VS Code
[Click on image for larger view.] Architecture to Use AWS Cloud9 to Power VS Code (source: AWS).

Key to the solution is AWS Cloud9, a cloud-based integrated development environment (IDE) that lets developers write, run and debug code with just a browser, providing a code editor, debugger and terminal. It comes with essential tools for popular programming languages such as JavaScript, Python, PHP and more, so devs don't need to install files or configure a development machine to start new projects.

Leveraging the Visual Studio Code Remote - SSH extension and AWS Cloud9 to power VS Code, the solution can help:

  • Automatically power on an instance when connected
  • Configure a SSH client to use AWS Systems Manager Session Manager to connect to a AWS Cloud9 instance
  • Modify a AWS Cloud9 instance to shut down after you disconnect

Prerequisites to follow along in the detailed post include:

While Codespaces and other remote dev solutions also leverage SSH to work on remote machines in VS Code, Ragusa's solution taps into specific AWS services to fit its cloud users.

"With AWS Cloud9, you start with an environment pre-packaged with essential tools for popular programming languages, coupled with the power of Amazon EC2," he said. "As an added advantage, you can even take advantage of AWS Cloud9's built-in auto-shutdown capability which powers off your instance when you're not actively connected to it."

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus

Featured

Subscribe on YouTube