AWS Cloud9

Yogesh Golande
CloudWithMORE
Published in
5 min readApr 6, 2018

AWS Cloud9 is a cloud-based integrated development environment which gives you a platform to write, run, and debug your code directly from a browser. It includes a code editor, debugger, and terminal. It supports hundreds of programming languages, including C, C++, PHP, Ruby, Perl, Python, JavaScript with Node.js, and Go. So you don’t need to install files or configure your development machine to start new projects.

Since your Cloud9 IDE is cloud-based, you can work on your projects from your office, home, or anywhere using an internet-connected machine.

Cloud9 also provides a seamless experience for developing serverless applications enabling you to easily define resources, debug, and switch between local and remote execution of serverless applications. With Cloud9, you can quickly share your development environment with your team, enabling you to pair program and track each other’s inputs in real-time.

Setting up Cloud9 Environment:

  1. Create and account on AWS Console and login to –
    https://console.aws.amazon.com/cloud9/home/product
  2. You need to first select the region where you want to create the environment. As of March 2018, Cloud9 is supported in 5 regions.

Click on Create environment

3. Provide Environment name and description

4. Instance configuration:

You can either choose to go for creating AWS EC2 instance or to connecting to an existing instance (any instance anywhere) remotely over SSH

  • New EC2 Environment — If you choose creating a new EC2 instance option, you can select the instance type and cost-saving setting which auto-hibernates your EC2 environment after specified amount of no activity time gap.You can go for the default network settings or have custom network configuration as per your requirement.
  • Choosing an existing instance — If you prefer connecting to an existing instance remotely over SSH, you need to provide the host and SSH authentication information.

5. Review your configuration settings and you are good to go.

The project environment will be available under /home/ec2-user/environment by default or at the path location specified by user under Environment path property while setting up the environment.

6. AWS Cloud9 comes with a terminal that includes sudo privileges to the managed Amazon EC2 instance that is hosting your development environment and a pre-authenticated AWS Command Line Interface.

So you can directly open a terminal and execute any operation or commands that you want in the EC2 instance straight from the terminal window.

Example:

Cloning code repository under the project — You can run git clone {repository_url} command inside the terminal under environment path and clone the required project code there. This code will then be accessible under the console.

In the above example, we have cloned a sample node.js project from git

git clone https://github.com/heroku/node-js-sample.git

This Node JS environment is already setup as part of AWS Cloud9. So you can directly start working on the application.

cd node-js-samplenpm install
npm start

You need to add TCP Protocol and Port 8080 into inbound rules of firewall configuration that you have in your instance in Cloud9 environment.

In case you are using AWS EC2 instance, this should be added in the Security Group associated with the EC2 instance in AWS Network configuration.

That’s it!!!

Access the URL with http://{SERVER_IP}:8080/

Benefits:

Start coding flexibly using any browser

No more setting up and maintaining local IDE and environments. Simply run your development environment AWS Cloud9 and write, run and debug your applications directly from any browser. Use features like code hinting, code completion, and step-through debugging to make the process much more efficient and time-saving. Use the Cloud9 terminal for browser-based coding experience which allows you to install any additional programs or enter new commands.

Real-time Code Collaboration

No need of any other 3rd party code collaboration tools anymore. Simply share your development environment with your team in just a few clicks and start collaborating your code. AWS Cloud9 let’s your team members to see each other type in real-time and instantly chat with one another from within the IDE itself.

Building serverless applications made easy

AWS Cloud9 makes it easy to write, run, and debug serverless applications. It preconfigures the development environment with all the SDKs, libraries, and plug-ins needed for serverless development. It also provides an environment for locally testing and debugging AWS Lambda functions. This allows you to iterate on your code directly, saving you time and improving the quality of your code.

Start new projects faster

No need to go through the painful process of installing SDKs, plugins, libraries, etc every time you want to start a new project which is based on a different language or platform than the previous ones. Cloud9’s development environment comes prepackaged with tooling for over 40 programming languages, including Node.js, JavaScript, Python, PHP, Ruby, Go, and C++. You to start writing code for popular application stacks just within minutes. Being cloud based, Cloud9 lets you maintain multiple development environments easily so that you can isolate your project’s resources.

--

--

Yogesh Golande
CloudWithMORE

Google Certified Cloud Architect & Data Engineer | AWS Certified Architect & Developer | Principal Architect @ Sela Technology Solutions (More)