Getting Started with AWS Cloud9 - Setting Up and Using a Browser-Based IDE

A cloud IDE that lets you complete AWS development entirely in the browser. Learn about Lambda development with a pre-installed SAM CLI environment and pair programming through real-time collaborative editing.

Cloud9 Features and Use Cases

Cloud9 is a browser-based integrated development environment (IDE) that automatically provisions a development environment on an EC2 instance (around t3.small), running at just a few dollars per month. The code editor, terminal, and debugger all run within the browser, eliminating the need to install development tools on your local machine. AWS CLI, SAM CLI, Docker, Node.js, Python, and Git come pre-installed, so you can start developing without spending time on environment setup. It is especially useful for onboarding new team members, standardizing environments for hands-on workshops, and avoiding issues caused by differences in local environments. Note that AWS stopped offering Cloud9 to new customers on July 25, 2024. Existing users can continue using it, but new AWS accounts cannot create Cloud9 environments.

Lambda Development and SAM CLI Integration

Cloud9 is optimized for Lambda function development, supporting local testing with up to 10 GB of /tmp storage and 15-minute timeouts. With SAM CLI pre-installed, you can create projects with sam init, run local tests with sam local invoke, and deploy with sam deploy, all from the terminal. It also supports inline debugging of Lambda functions, allowing you to set breakpoints and step through code. Since Docker is available, you can run API Gateway local emulation with sam local start-api. Because the Cloud9 environment runs on an EC2 instance, it can access VPC resources (RDS, ElastiCache) over the private network, making integration tests that are difficult in local development easy to run.

Cost Management and Security

Cloud9 itself is free to use; you only pay for the EC2 instance and EBS storage. The auto-stop feature automatically stops the EC2 instance after a period of inactivity and restarts it when you access it again. The default stop timer is 30 minutes, adjustable to suit your development style. With a t3.small instance used 8 hours per day, the monthly cost is just a few dollars. On the security side, AWS Managed Temporary Credentials are automatically injected into the environment, allowing access to AWS resources with the IAM user's permissions. There is no need to store access keys in files, reducing the risk of credential leaks. However, Managed Temporary Credentials have some limitations; certain IAM operations and some CloudFormation operations may be restricted, requiring explicit credential configuration for such operations. For more detailed coverage of Cloud9, you can also check related books on Amazon.

Cloud9 Alternatives and Migration Paths

New customers who created AWS accounts after July 25, 2024 cannot use Cloud9, so alternatives must be considered. AWS CloudShell is a browser-based shell environment with pre-installed AWS CLI and SAM CLI, providing equivalent convenience to Cloud9 for terminal-only operations. However, CloudShell lacks code editor functionality and is unsuitable for serious coding work. The combination of a local IDE (VS Code, JetBrains) with AWS Toolkit extensions is the recommended workflow as a Cloud9 successor. AWS Toolkit provides SAM template creation support, Lambda function local debugging, and CloudFormation stack management from within the IDE, covering Cloud9's core features. For remote development needs, VS Code Remote - SSH connects to EC2 instances, providing a local-equivalent editing experience in a remote environment.

Cloud9 Limitations and Considerations

While Cloud9 offers great convenience, operational limitations should be understood. EC2-based environments have a default root volume (EBS) size of only 10 GB, and when working with Docker images or large projects, EBS volume expansion is necessary. Use the resize.sh script or AWS CLI to modify volume size and extend the file system. For networking, the default configuration places Cloud9 environments in public subnets with inbound security group SSH access restricted to Cloud9 service IP ranges, but using Systems Manager connections allows placement in private subnets for enhanced security. The collaborative editing (pair programming) feature works in real-time, but sharing an environment grants invited users access to all files within the environment, so care must be taken not to inadvertently place credential files in the workspace.

Summary

Cloud9 is a cloud IDE that lets you complete AWS development entirely in the browser. It provides pre-configured development tools, local Lambda function testing, and integrated AWS CLI operations from the terminal. Running on an EC2 instance, it supports real-time collaborative editing with team members, streamlining pair programming and code reviews. Since July 25, 2024, it is no longer available to new customers, so new users should consider the combination of a local IDE with AWS Toolkit, or AWS CloudShell as alternatives.