Creating a Lambda Function with a Container-Based Runtime
Creating a Lambda Function with a Container-Based Runtime

CLOUD LABS

Creating a Lambda Function with a Container-Based Runtime

In this Cloud Lab, we’ll host a Python application on Amazon Elastic Container Registry (Amazon ECR) and then create a Lambda function using this hosted image as the container runtime.

8 Tasks

beginner

1hr 30m

Certificate of Completion

Desktop OnlyDevice is not compatible.
No Setup Required
Amazon Web Services

Learning Objectives

Hands-on experience building and pushing a Docker Image to Amazon ECR
Working knowledge of creating and working with Dockerfiles and Docker containers
Familiarity with creating and testing Lambda functions
Hands-on experience deploying a Lambda function using a container image

Technologies
AWS logoAWS
Lambda
EC2
ECR
Containerization
Skills Covered
Using AWS Cloud Services
Container Management Using Docker
Cloud Lab Overview

Amazon Elastic Container Registry (ECR) is a managed AWS service that allows you to host your Docker images on AWS. It is very reliable and allows secure deployment of your images and architectures. It enables you to create both public and private repositories so that you can control access to your images and architectures. AWS Lambda is a serverless platform that allows you to upload your code as a zip file or a container image without the hassle of managing infrastructures.

In this Cloud Lab, you’ll first create an ECR repository. Then, you’ll create a Cloud9 environment and configure a simple Python application. You’ll use the integrated terminal in Cloud9 to containerize this application and then push the Docker image to the ECR repository. You’ll then create a Lambda function using this container image as the runtime and then test this function.

By the end of this Cloud Lab, you’ll have hands-on experience in creating and managing Docker containers and Lambda functions, essential skills for any AWS architect.

After the completion of this Cloud Lab, the architecture diagram will look like the following:

Architecture diagram
Architecture diagram
Cloud Lab Tasks
1.Introduction
Getting Started
2.Configure the Environment
Create an ECR Repository
Create a Cloud9 Environment
Install Docker in the EC2 Instance
3.Create the Resources
Build and Push the Docker Image
Create a Lambda Function
4.Conclusion
Clean Up
Wrap Up
Labs Rules Apply
Stay within resource usage requirements.
Do not engage in cryptocurrency mining.
Do not engage in or encourage activity that is illegal.

Trusted by 1.4 million developers working at companies including

Don’t take our word for it. See what our developers have to say.

Your method is simple, straight to the point and I can practice with it everywhere, even from my phone, that's something I have never had in other learning platforms.

Felipe Matheus
TestimonialsImg

I highly recommend Educative. The courses are well organized and easy to understand.

Adina Ong
TestimonialsImg

I prefer Educative courses because they have a nice mix of text & images. I find that with full video courses, it can often be too easy to go into passive learning mode.

Clifford Fajardo
TestimonialsImg

I prefer Educative courses because they have a nice mix of text & images. I find that with full video courses, it can often be too easy to go into passive learning mode.

Clifford Fajardo
TestimonialsImg
Don’t take our word for it. See what our developers have to say.

Your method is simple, straight to the point and I can practice with it everywhere, even from my phone, that's something I have never had in other learning platforms.

Felipe Matheus
TestimonialsImg

I highly recommend Educative. The courses are well organized and easy to understand.

Adina Ong
TestimonialsImg

I prefer Educative courses because they have a nice mix of text & images. I find that with full video courses, it can often be too easy to go into passive learning mode.

Clifford Fajardo
TestimonialsImg

Get access to Educative Cloud Labs

Course Footer Image
Course Footer Image