1. Create an AWS Account

If you haven’t done so already, create an AWS account.

  1. Goto aws.amazon.com.

  2. Choose Sign In to the Console.

  3. Choose Create a new AWS account.

  4. Complete the process by following the on-screen directions.

2. Create an IAM Group and User

AWS Identity and Access Management (IAM) enables you to securely control access to AWS services and resources for your users.

  1. Sign in to the AWS Management Console, if you are not already signed in, at console.aws.amazon.com.

  2. Open the IAM console. At the AWS services field type IAM and select IAM Manage User Access and Encryption Keys.

  3. In the IAM console’s navigation pane, choose Groups.

  4. Choose Create New Group.

  5. On the Set Group Name page, for Group Name, type a name for the new group.

  6. Choose Next Step.

  7. On the Attach Policy page, select the box next to AdministratorAccess and AWSCodeCommitFullAccess (if you don’t see either of these policy names in the list, type the policy name in the Filter box to display it).

  8. Choose Next Step.

  9. Choose Create Group.

  10. In the navigation pane, choose Users.

  11. Choose Add user.

  12. For User name, type a name for the new user.

  13. Select both the Programmatic access and the AWS Management Console access check boxes. This allows the new user to use various AWS developer tools and service consoles.

  14. Leave the default choice of Autogenerated password, which creates a random password for the new user to sign in to the console.

  15. Leave the default choice of Require password reset, which prompts the new user to change their password after they sign in to the console for the first time.

  16. Choose Next: Permissions.

  17. Leave the default choice of Add user to group.

  18. In the list of groups, select the check box (not the name) next to the group you want to add the user to.

  19. Choose Next: Review.

  20. Choose Create user.

  21. On the last page of the wizard, choose Download .csv and save the file on your local computer (don’t forget where you placed it).

    This is the only time you can view the new user’s AWS secret access key and console sign in password.
  22. Choose Close.

  23. In the navigation bar, logout from your account by choosing Sign Out from the menu where your AWS account name appears.

3. Create a Cloud9 Environment

AWS Cloud9 contains a collection of tools that you use to code, build, run, test, debug, and release software in the cloud. To work with these tools, you use the AWS Cloud9 integrated development environment, or IDE.

When we create an AWS Cloud9 environment we’ll also create an Elastic Compute Cloud (EC2) instance. EC2 is a web service that provides secure, resizable compute capacity in the cloud. It is designed to make web-scale cloud computing easier for developers.

  1. Log in using the information from the CSV file from step 21 of the previous section. Open your browser with Console login link. Type the IAM user name and the Password.

  2. Provide the requested information to change your password.

  3. Choose Confirm password change.

  4. Open the Cloud9 console. At the AWS services field type Cloud9 and select Cloud9 A Cloud IDE for Writing, Running, and Debugging Code.

  5. Choose Create environment.

  6. On the Name environment page, type a name and a description for your environment.

  7. Choose Next step.

  8. On the Configure settings page, keep all the default options.

  9. Choose Next step.

  10. On the Review page, choose Create environment.

4. Configure the Security Group

A security group acts as a virtual firewall that controls the traffic for one or more instances. When you launch an instance, you associate one or more security groups with the instance. You add rules to each security group that allow traffic to or from its associated instances.

  1. Go to aws.amazon.com and choose Sign in to the Console.

  2. Open the EC2 console. At the AWS services field type EC2 and select EC2 Virtual Servers in the Cloud.

  3. In the navigation pane, choose Security Groups.

  4. Select the box of the security group that starts with aws-cloud9- followed by the name of your Cloud9 environment from step 6 of the previous section.

  5. On the Inbound tab, choose Edit.

  6. On the Edit inbound rules window, choose Add Rule.

  7. Populate the new row with the following information:

    1. Type: Custom TCP Rule

    2. Protocol: TCP

    3. Port Range: 8080

    4. Source: Anywhere

    5. Description: HTTP testing port

  8. Choose Save.

5. Test the Cloud9 Environment

  1. Take note of your instance’s name. At the Cloud9 terminal, type:

    echo $C9_HOSTNAME
  2. Run a simple web server. At the Cloud9 terminal, type:

    python3 -m http.server 8080
  3. Access the web server from a web browser. At the browser address bar, type:

    hostname:8080

    where hostname is your instance’s name as obtained in step 1.

    The output in the browser should be something like this:

    Directory listing for /
    
        .c9/
        README.md