Create Lambda with Container Based Runtime

   Go back to the Task List

  « 2: Create ECR Repository    4: Create Container Image »

3: Launch Cloud9 Environment

You launch AWS Cloud9 environment which works as the development environment to create container image.

  1. Goto the AWS Cloud9 console and click on the Create environment button.

    Cloud9

  2. On the next screen, enter dojoenvironment as the name and click on the Next step button.

    Cloud9

  3. On the next screen, select Environment type as Create a new instance for environment (EC2). Select Instance type as t2.micro (1 GiB RAM + 1 vCPU). Select Ubuntu Server 18.04 LTS for the Platform. The development environment will have Ubuntu as the operating system. Keep rest of the fields with the default values and click on the Next step button.

    Cloud9

  4. On the next screen, click on the Create environment button.

  5. It will take couple of minutes to create the environment. Wait for the environment to be ready. Once it is ready, you can see console window in the bottom part of the screen. It provides console base access to the development machine.

  6. You will now configure the environment for the Docker. Run the following command in the console to update the environment.

     sudo apt-get update
    

    ` Cloud9

  7. Next run the following command in the console to install the Docker package.

     sudo apt install docker.io
    

    ` Cloud9

  8. Next run the following commands one by one to automate Docker start.

     sudo systemctl start docker
     sudo systemctl enable docker
    

    ` Cloud9

  9. The Docker is installed and configured. Run the following command to check the version of the Docker installed.

     docker --version
    

    ` Cloud9

  10. With environment ready, it is time to create the container image.