Welcome to the world of AWS Cloud 9, where seamless development and collaboration meet in the cloud! Whether you’re a seasoned developer or just starting your coding journey, Cloud 9 is here to revolutionize the way you build and deploy applications.
Imagine having the power to write, run, and debug your code all within a browser-based integrated development environment (IDE). This powerful tool eliminates the need for complex local setups and ensures you can work from anywhere, at any time, with just an internet connection.
With Amazon Cloud 9, you can effortlessly collaborate with peers, making team projects a breeze. Its real-time collaboration feature enables multiple developers to code together, edit files simultaneously, and instantly see each other’s changes. Say goodbye to version control nightmares and hello to efficient, hassle-free teamwork.
But that’s not all; Cloud 9 offers a wide range of programming language support, including popular options like Python, JavaScript, PHP, and more. Whether you’re building web applications, mobile apps, or even machine learning models, Cloud 9 has got you covered.
How does AWS Cloud9 work?
The following diagram shows a high-level overview of how AWS Cloud9 works.
The diagram represents how you interact with your AWS Cloud9 environment by running the AWS Cloud9 IDE in a web browser on your local computer. A computer resource connects to that environment (for example, an Amazon EC2 instance or your own server). Finally, your work is saved in a remote repository such as AWS CodeCommit.
AWS Cloud9 environments
An AWS Cloud9 environment is a location where you store your project’s files and run the tools used to develop your apps.
Using the AWS Cloud9 IDE, you can:
- You can save the project’s file locally may it be an instance or a server.
-
You can clone a remote code repository into your environment, such as a repo in AWS CodeCommit.
-
You can work with various combinations of local and cloned files in the environment.
You can build and switch between many environments, each one assigned to a single development project. The projects no longer need to be linked to a single machine or server setup by saving the environment in the cloud. This means no more hassle to do things like swap between laptops and onboard developers to your team more quickly.
Discover what you can do with AWS Cloud 9
AWS Cloud9 empowers developers to engage in a wide array of activities, offering a versatile platform for coding, building, testing, debugging, and releasing software. This encompasses various scenarios and options, including:
-
Multi-language Development: Use the features of AWS Cloud Development Kit (AWS CDK) and work seamlessly with code from multiple programming languages.
-
Containerized Coding: Develop and run code within a live Docker container for enhanced flexibility and efficiency.
-
Online Code Repositories: Allow to use of code repositories online to streamline collaboration and version control.
-
Real-time Collaboration: Allows to collaborate with team members in real-time to achieve efficient synchronized output.
-
Database and Website Interactions: Allow to interact with different database and website technologies.
-
Serverless Applications: To focus on AWS Lambda, Amazon API Gateway, and AWS Serverless Applications.
-
Integration with AWS Services: Integrating AWS Cloud9 to other AWS Products such as Amazon Lightsail, AWS CodeStar, and AWS CodePipeline smoothly.
Setting up AWS Cloud 9
To dive into the world of AWS Cloud9, choose one of these paths based on your Cloud9 journey. However, we will walk through Individual User Setup in this tutorial.
Individual user setup for AWS Cloud9
This step describes how to set up and use AWS Cloud9 as the only user in your AWS account when you’re not a student. Skip this step when you have your AWS Account.
Sign up for an AWS account
-
Follow the online instructions.
Part of the sign-up procedure involves receiving a phone call and entering a verification code on the phone keypad.
When you sign up for an AWS account, an AWS account root user is created. The root user has access to all AWS services and resources in the account. As a security best practice, assign administrative access to an administrative user, and use only the root user to perform tasks that require root user access.
Once the sign-up process is completed, AWS will send you a confirmation email. By visiting https://aws.amazon.com/, you can view your current activity and manage your account by selecting My Account.
Create an administrative user
After you sign up for an AWS account, create an administrative user so that you don’t use the root user for everyday tasks.
Secure your AWS account root user
-
Sign in to the AWS Management Console as the account owner by choosing Root user and entering your AWS account email address. On the next page, enter your password.
-
Turn on multi-factor authentication (MFA) for your root user.
Create an administrative user
-
For your daily administrative tasks, grant administrative access to an administrative user in the AWS IAM Identity Center.
Sign in as the administrative user
-
To sign in with your IAM Identity Center user, use the sign-in URL that was sent to your email address when you created the IAM Identity Center user.
Basic Tutorials for AWS Cloud9
Create an EC2 Environment with the console
-
Sign in to the AWS Cloud9 console:
-
-
If you’re the only one using your AWS account or you’re an IAM user in a single AWS account, go to https://console.aws.amazon.com/cloud9/.
-
If your company uses AWS IAM Identity Center, ask your AWS account administrator for sign-in instructions.
-
If you’re a student in a classroom, ask your instructor for sign-in instructions.
-
-
-
Select an AWS Region to set up the environment from the top navigation bar of the AWS Cloud9 console after logging in. For a list of available AWS Regions, see AWS Cloud9 in the AWS General Reference.
-
Choose the Create Environment button in one of the locations shown.
If your AWS Cloud9 environments are not yet set up, the button is shown on a welcome page.
If you already have AWS Cloud9 environments, the button is shown as follows.
-
On the Create Environment page, for Name, enter a name for your environment.
-
For Description, enter something about your environment. For this tutorial, use this environment for the AWS Cloud9 tutorial.
-
For Environment type, choose New EC2 instance to create an Amazon EC2 environment:
-
-
New EC2 instance – Launches a new Amazon EC2 instance to which AWS Cloud9 can connect directly over SSH. You can use the Systems Manager to interact with new Amazon EC2 instances. For more information, see Accessing no-ingress EC2 instances with AWS Systems Manager.
-
Existing compute – Launches an existing Amazon EC2 instance that requires SSH login details for which the Amazon EC2 instance must have an inbound security group rule.
-
If you select the Existing compute option, a service role is automatically created. You can view the name of the service role in a note at the bottom of the setup screen.
-
-
-
-
On the New EC2 instance panel, for Instance type, keep the default choice. This option might have low RAM and fewer vCPUs. However, this memory is enough for this tutorial. It’s important to note that opting for an instance type with higher RAM and vCPU specifications could result in additional charges to your AWS account for Amazon EC2.
-
For Platform, choose the type of Amazon EC2 instance that you want. For this tutorial, we will use the recommended one as it provides a secure, stable, and high-performance runtime environment. Amazon Linux 2023 AMI includes long-term support through 2024. AWS Cloud9 creates the instance and then connects the environment to it.
-
Choose a period for Timeout. This selection determines how long AWS Cloud9 is inactive before auto-hibernating. AWS Cloud9 waits a specified period before shutting down the Amazon EC2 instance for the environment after all web browser instances linked to the environment’s IDE have closed. However, choosing a longer period might result in more charges to your AWS account.
-
On the Network settings panel, choose how your environment is accessed from the two following options:
-
-
AWS System Manager (SSM) – This method accesses the environment using SSM without opening inbound ports.
-
Secure Shell (SSH) – This method accesses the environment using SSH and requires open inbound ports.
-
-
-
Choose VPC Settings to display the Amazon Virtual Private Cloud and Subnet for your environment. AWS Cloud9 uses Amazon Virtual Private Cloud (Amazon VPC) to communicate with the newly created Amazon EC2 instance. In this tutorial, It is recommended to stick with the default VPC. With the default settings, AWS Cloud9 attempts to automatically use the default VPC with its single subnet in the same AWS account and Region as the new environment.
-
Add up to 50 tags by supplying a Key and Value for each tag. Do so by selecting Add new tag. The tags are attached to the AWS Cloud9 environment as resource tags and are propagated to the following underlying resources: the AWS CloudFormation stack, the Amazon EC2 instance, and Amazon EC2 security groups. Note that any updates made to these tags after their creation won’t be automatically applied to the associated resources. To learn more about tags, see Control Access Using AWS Resource Tags in the IAM User Guide and advanced information in this guide.
-
Select Create to create your environment, and then you’re redirected to the home page. If the account is successfully created, a green flash bar appears at the top of the AWS Cloud9 console. You can select the new environment and choose Open in Cloud9 to launch the IDE.
If the account fails to be created, a red flash bar appears at the top of the AWS Cloud9 console. Your account might fail to be created because of a problem with your web browser, your AWS access permissions, the instance, or the associated network. You can find information about possible fixes in the AWS Cloud9 Troubleshooting section.
In conclusion, this is the initial stage of setting up an environment. We gathered knowledge about creating an administrator and root user account for AWS Cloud 9. Additionally, you were shown how to use the console to build and set up an EC2 environment. Take note and be aware that configuring settings such as the timeout to exceed 30 minutes when producing for testing or personal experiments could potentially result in charges to your AWS account for Amazon EC2.
In addition, getting started with Amazon Cloud 9 also involves a lot of work and features, such as writing, running, and debugging code as well as deleting the environment you’ve been using to prevent any costs to your AWS Account. As a result, this will be discussed in the next tutorial. Hope this tutorial helps you in any way in beginning your Cloud 9 Journey to AWS.