Going to Cloud9: Your First AWS Service

Session Overview

  • Becoming Cloud Native
  • AWS Cloud Shell
  • AWS Cloud9

Becoming Cloud Native

Cloud Native: Doing everything you could do on your local machine but better, faster, and much, much more on the Cloud.


Requires a paradigm shift to connecting services, not lift and shifting servers.

AWS Cloud Shell

Your Portal to the Cloud!

  1. Log on via SSO and Open the Management Console
  2. Select the Terminal/CloudShell button near the top right.

Session Overview

  • What is Cloud9?
  • Setting up Cloud9
  • Using Cloud9

What is Cloud9?

  • YOUR development environment in the Cloud
  • Linux box where you are admin
  • Preconfigured with lots of Goodies!
    • Git
    • Docker
    • AWS CLI
    • Python
    • Networking

Setting up Cloud9

  1. Log into AWS via SSO (Single Sign On)
  2. Open Management Console
  3. Find Cloud9 in the Search
  4. Create Environment

Create A Cloud9 Environment

First Page:

  • Name: esds-
  • Description: Development Environment for Earth System Data Science in the Cloud.

Next Step:

  • Environment Type: Default (Direct Access)
  • Instance Type: Other - m5.xlarge
  • Platform: Amazon Linux 2
  • Cost Saving: Default
  • Network:
    • Connection: SSH
    • VPC: cloud9-vpc
    • Subnet: -public
  • Tags:
    • project: esds
    • owner: cicsnc-id
    • stage: dev

Next Step:

  • Review
  • Create Environment

Add Storage

  1. Click on Account (You) Icon
  2. Select Manage EC2 Instance
  3. Select Instance
  4. Stop Instance (and confirm when prompted)
  5. Refresh until stopped
  6. Select Instance
  7. Navigate to Storage
  8. Select Volume ID
  9. Select Volume
  10. Under Actions, select Modify Volume
  11. Choose a 50GiB SSD
  12. Select Modify

Using Cloud9

For fun:

pip install speedtest-cli
speedtest-cli

Cloud9 Credentials

Check out:

cat ~/.aws/credentials

Using Cloud9 | Jupyter Lab

For more fun, let’s launch Jupyter Lab!

Jupyter Stack

docker run -it \
  --rm -p 8080:8888 \
  -v "${PWD}":/home/jovyan/work \
  jupyter/datascience-notebook \
  jupyter lab --ip 0.0.0.0 --NotebookApp.token=''  

Note, we are:

  • Allocating psuedo-TTY with -it
  • Making it ephemeral with --rm
  • Mapping port 8080 on Cloud9 to container port 8888 with -p
  • Mounting local working directory to working directory in container with -v
  • Using Jupyter’s datascience-notebook
  • Telling Jupyter that we can log into its server instance without a passtoken

Connecting to Jupyter Lab

  • Click Preview on Top of Cloud9
  • Select Browser Popout into New Window
  • Your Jupyter Lab instance should pop up in a new browser tab.

Congratulations!

You are well on your way to being Cloud Native!