Step 1: Create an environment - AWS Cloud9

Step 1: Create an environment

(First step of Tutorial: Hello AWS Cloud9 (console))

In this step, you use the AWS Cloud9 console to create and then open an AWS Cloud9 development environment.

Note

If you already created the environment that you want to use for this tutorial, open that environment and skip ahead to Step 2: Basic tour of the IDE.

In AWS Cloud9, a development environment, or environment, is somewhere where you store your development project's files and run the tools to develop your applications. In this tutorial, you create an EC2 environment, and work with the files and tools in that environment.

Create an EC2 Environment with the console

  1. Sign in to the AWS Cloud9 console:

    • If you're the only one that 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 organization uses AWS IAM Identity Center (successor to AWS Single Sign-On), ask your AWS account administrator for sign-in instructions.

    • If you're a student in a classroom, ask your instructor for sign-in instructions.

  2. After you sign in to the AWS Cloud9 console, in the top navigation bar choose an AWS Region to create the environment in. For a list of available AWS Regions, see AWS Cloud9 in the AWS General Reference.

    
                AWS Region selector in the AWS Cloud9 console
  3. Choose the large Create environment button in one of the locations shown.

    If you don't already have AWS Cloud9 environments, the button is shown on a welcome page.

    
                Welcome page in the AWS Cloud9 console

    If you already have AWS Cloud9 environments, the button is shown as follows.

    
                Create environment button in the AWS Cloud9 console
  4. On the Create environment page, for Name, enter a name for your environment.

  5. For Description, enter something about your environment. For this tutorial, use This environment is for the AWS Cloud9 tutorial.

  6. For Environment type, choose New EC2 instance to create an Amazon EC2 environment:

    • New EC2 instance – Launches an Amazon EC2 instance that AWS Cloud9 can connect to directly over SSH.

    • Existing compute – Launches an Amazon EC2 instance that doesn't require any open inbound ports. AWS Cloud9 connects to the instance through AWS Systems Manager.

      • If you select the Existing compute option, a service role and an IAM instance profile are automatically created. Together, they allow Systems Manager to interact with the EC2 instance on your behalf. You can view the names of both in the Service role and instance profile for Systems Manager access section. For more information, see Accessing no-ingress EC2 instances with AWS Systems Manager.

    Warning

    Creating an EC2 instance for your environment might result in possible charges to your AWS account for Amazon EC2. There's no additional cost to use Systems Manager to manage connections to your EC2 instance.

  7. On the New EC2 instance panel for Instance type, keep the default choice. This option might have less RAM and fewer vCPUs. However, this amount of memory is sufficient for this tutorial.

    Warning

    Choosing instance types with more RAM and vCPUs might result in additional charges to your AWS account for Amazon EC2.

  8. For Platform, choose the type of Amazon EC2 instance that you want: Amazon Linux 2, Amazon Linux, or Ubuntu. AWS Cloud9 creates the instance and then connects the environment to it.

    Important

    We recommend that you choose the Amazon Linux 2 option for your EC2 environment. In addition to providing a secure, stable, and high-performance runtime environment, Amazon Linux 2 AMI includes long-term support through 2023.

    Standard support for the previous version of Amazon Linux AMI discontinued on December 31, 2020. Now this version only receives maintenance support.

    For more information, see the Amazon Linux 2 page.

  9. Choose a time period for Timeout. This option determines how long AWS Cloud9 is inactive before auto-hibernating. When all web browser instances that are connected to the IDE for the environment are closed, AWS Cloud9 waits the amount of time specified and then shuts down the Amazon EC2 instance for the environment.

    Warning

    Choosing a longer time period might result in more charges to your AWS account.

  10. On the Network settings panel, choose how your environment is accessed from the two following options:

    • AWS Systems 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.

  11. 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. For this tutorial, we recommend that you don't change the preselected default settings. 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.

    You can find more information about Amazon VPC choices in Create an EC2 Environment with the Console, and in VPC settings for AWS Cloud9 Development Environments.

  12. 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. To learn more about tags, see Control Access Using AWS Resource Tags in the IAM User Guide and advanced information in this guide.

    Warning

    If you update these tags after you create them, the changes aren't propagated to the underlying resources. For more information, see Propagating tag updates to underlying resources in the advanced information about tags.

  13. Choose 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.

    
        AWS Cloud9 IDE selector in the AWS Cloud9 console

    If the account fails to create, a red flash bar appears at the top of the AWS Cloud9 console. Your account might fail to create 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.

Next step

Step 2: Basic tour of the IDE