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 at Converge 360.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube