In 2016, Amazon acquired a small web-based firm called Cloud9, which was known for its integrated development environment....
Many IT teams used the service for a better development experience when building cloud-based applications, including with Amazon Web Services. Cloud9's focus was to make sure that users could access a full-featured development environment in different locations.
At re:Invent 2017, Amazon unveiled the AWS Cloud9 integrated development environment (IDE), a service that's free, except for the underlying Elastic Compute Cloud (EC2) and Elastic Block Store resources that it uses. Essentially, AWS made the Cloud9 IDE part of its ecosystem, with a service that automatically creates a new instance with the development environment pre-installed. AWS makes that IDE available to users directly within the console.
In addition to letting users develop with a browser, the AWS Cloud9 IDE also enables developers to share any tab they're working on within the IDE, including code and terminal windows. Developers can share their environments with any other AWS Identity and Access Management (IAM) user on the account, which can make it easier to work on applications even if they're in different locations.
Train new developers
The development environment setup takes on the AWS credentials of the user who creates it, so don't let a user with super-user privileges set one up. This would mean that a developer -- perhaps an untrusted one -- could access anything in the AWS cloud that a super user could, which could cost thousands of dollars, not to mention headaches.
You will, however, get a warning message whenever you invite a developer to the environment, indicating that he or she will have access to the shared AWS credentials on that machine.
When you onboard new developers, set them up with their own IAM credentials and guide them through a new Cloud9 IDE setup. Once that's done -- preferably in a nearby region -- the new developer can share that environment with the person who is training them. To do this, the developer can enter the IAM username for the trainer via the share menu.
The trainer can then see the shared development environment in the Cloud9 console. The trainer can access the environment via a link in the shared IDEs section of the console. Note that these environments are region-specific, so make sure you're in the same AWS region as the new environment.
Developers can expand the Collaborate tab to see other collaborators and the tabs they're working on. They can also view terminals and files edited by other developers, and they can see where the cursor is on the screen. Developers can help edit code while others watch or just supervise the development process.
This experience makes it easier to debug issues that new developers encounter. It's the modern equivalent to going over to someone else's computer when they have a problem.
Mind environment ownership
Early on, I attempted to set up a new IAM role for a shared developer account. The idea was to set up one IDE that everyone could share for that particular project. Unfortunately, there's a flaw with this design: The primary user must be logged in for the AWS credentials to work properly.
My developer saw strange errors when trying to run some scripts:
ExpiredTokenException: The security token included in the request is expired
The script causes this error when it is unable to find a valid AWS access token. When I logged in with the Cloud9 role and accessed the IDE, the problem went away.
Additionally, the home directory is shared for everyone on that IDE, so when you commit code, you commit it as whoever owns that development environment. It's not a good idea to share one IDE, as IDEs are primarily designed to allow one developer to assist another.
Share with remote dev teams
The IDE sharing feature can be incredibly useful when you work with remote development teams. At Cannabiz Media, we have no physical offices. We recently hired a new developer that lives in California, while our other developers work in Ohio. Our developers occasionally meet to go over things that are best done in person, such as environment creation and setup or code reviews. But a trip to California is out of the question for these minor issues.
The AWS Cloud9 IDE helped solve this problem. A developer spun up an IDE and invited me to it. When he runs a script, I can log in and make sure it's correct. When he encounters an issue, he contacts me, and I check out what's going on. The IDE enables me to quickly see exactly what another developer works on and run simple commands.
Cloud9 service integration
Cloud9 integrates with IAM to manage user access, but it also integrates directly with AWS Lambda for quick and simple deployments. Cloud9 supports SAM Local for Lambda function tests before deployment with just a few clicks.
Amazon supports any other AWS integration, as the Cloud9 IDE just launches an EC2 instance that runs the AWS Linux AMI with the AWS Command Line Interface tools pre-installed. In our environments, we have Serverless Framework installed, which makes for quick deployments to Lambda.
The fast network connection at AWS enables even simple tasks, such as installing npm modules, to execute rapidly. Additionally, instances automatically shut down 30 minutes after the last person closes the browser window, so AWS only charges companies for the amount of time developers have their tabs open. But it's important that developers understand this billing method, and that they don't leave background tabs open when they leave for the night.
It's not for everyone
What drew me to the AWS Cloud9 IDE was its native support of the Vim text editor. I've used Vim for more than a decade, and this is the first environment with full Vim support. But Cloud9 neither supports the vast plug-in ecosystem, nor has specialized syntax highlighting for less popular languages such as TypeScript.
Additionally, the AWS Cloud9 IDE is only available in a browser. There's no desktop or mobile app to download, which can make it confusing for developers who have worked with terminals or desktop IDEs. It's also only available online, so it won't work if you can't connect to AWS, such as when you travel or leave network range.
It's not perfect, but Amazon only acquired this technology a little more than a year before releasing it. The IDE integrates well with the rest of the AWS ecosystem, and the cloud provider will enhance it over time.