Cloud9 the almost perfect IDE that solves configuration hell for development environments

Andrew WC Brown
ExamPro
Published in
5 min readNov 25, 2018

The idea of using an in-browser IDE sounds gross and using in-browser IDE’s of the past I had this bad-taste in my mouth. I just expect latency, clunky or limited keybindings but I thought it was worth seeing if the technology has improved and I think I can make a home in Cloud9.

I’m a VIM user with powerful plugins and it may sound strange that I would turn the dial from 11 down to 8 on my own productivity just to have an IDE in the cloud but you need to understand the synergies gained even if it means you can’t crank code at neck-brake speeds.

Cloud9 is attached to a running Environment

Cloud9 will create by default a EC2 instance with Amazon Linux 1 which comes preloaded with a bunch of programming environments to reduce configuration. Since its an EC2 instance you can backup that instance when needed.

Cloud9 only Runs When In Use Saving You $$$

You only pay for the environment that is attached to Cloud9. If you choose to create instead of attach an existing EC2 instance to Cloud9 it comes with cost-saving capabilities where it only runs the server while you’re using it. So you can be paying 5–10 USD for your work environment per month and if you’re on Free Tier you can run t2.micro instance and have a free development environment for months.

Cloud9 is real-time collaborative like a Google Doc

You can have as many people as you like sitting in the same Cloud9 IDE, see their cursor in any file and share terminal windows. You can give people read or write access.

Scenarios of Use

You can use Cloud9 to teach a class of 20 people and have them look in the codebase or grant each person write access to take turns coding.

You can conduct remote pair programming interviews on your codebase and mitigate security risks about sharing code so early on with an new interviewee

You can spin up new environments in minutes so the “broken configuration / broken computer” excuse never happens or when you have 5 new interns you have 5 new environments

If you’re hiring contract programmers you don’t have to waste time and money with the them figuring out how to setup your environment.

You don’t need a beast of computer and as long as you have an internet connection you can develop from anywhere increasing mobility and availability.

Since you can attach any instance you like to Cloud9 you can get your development environment to be similar to your production environment

What’s not great about Cloud9

Cloud9 is good but still has some warts and this comes in regards to custom environments and automating the setup of environments.

Limited CloudFormation Configuration

The first thing that comes to mind is I would want to automate the setup of these new Cloud9 environments using CloudFormation. Currently CloudFormation customization is limited to only being able to create the default EC2 instance with Amazon Linux 2.

Type: AWS::Cloud9::EnvironmentEC2
Properties:
Repositories:
- Repository
OwnerArn: String
Description: String
AutomaticStopTimeMinutes: Integer
InstanceType: String
Name: String
SubnetId: String

I would think or hope that this when !Ref this resource it return the EC2 instance so you could then configure this Amazon Linux 1 but I don’t this for certain.

This is what !Ref would return

Only having Amazon Linux 1 doesn’t work for my already existing stack because we are using Postgres 10 and because of systemd or lack their of its very hard or impossible to install Postgres 10 which means I need to use Amazon Linux 2 or downgrade by Postgres version.

Its frustrating having spent weeks configuring Amazon Linux 2 for Rails 5 and Postgres 10 and to have to roll back postgres versions and change my entire cfn-init configuration.

Custom Environments are a Pain

Lets say you need to use something other than Amazon Linux 2. You can connect a pre-existing EC2 instance by adding the SSH public key to your EC2 instance that is generated by your Cloud9 ENV.

This now leads to questions such as:

  • Why doesn’t Cloud9 integrate with EC2 key pairs?
  • How do I restrict access to my EC2 instance only to Cloud9? Since I don’t want to open SSH port to everyone
  • Does Cloud9 have a public IP and if so is it static or does it have a DNS? I suppose I could see what address attempts to connect to the EC2 instance and assume I should whitelist that address.

So now I have to run the CloudFormation template. Create the Cloud9 environment, and then create and run a System Manager Run Command to add the Public SSH Key.

Also if I want the cost-saving features I have to code that into the environment myself.

How do we fix Cloud9?

I hope the Cloud9 department at Amazon Web Services is reading this because here are the fixes to makes Cloud9 amazing:

  • Be able to choose AMI beyond Amazon Linux 1
  • Integrate with EC2 Key Pairs
  • Via CloudFormation create an unattached Cloud9 Environment
  • Via CloudFormation attach to an existing EC2 instance
  • Create a default SSM Run Command to install Key Pair and/or Auto-hibernate for custom servers

I think the only thing that they couldn’t fix is having Cloud9 have a static IP since we have to pay for ElasticIP and we get so few of them I can’t see them handing out Static IPs for every Cloud9 environment spun up.

How do we make Cloud9 work now?

You need to make it work with the default Amazon Linux 1 and you might not be able to use the latest and greatest packages. This is hard since most web-development companies have a hard time staying vanilla but here’s me trying.

--

--

Andrew WC Brown
ExamPro

I have an unhealthy obsession with web-development.