I worked on a containerized application to get familiar with running containers in AWS Lambda. The project involved building a Docker image, pushing it to Amazon ECR, and deploying it as a Lambda function using Lambda’s container image support.

Architecture Overview

The system consisted of:

  • Amazon ECR to store the container image
  • AWS Lambda to run the container as a function
  • A test client that invoked the Lambda function with a set of domains to validate
    Lambda Container Architecture
    Architecture showing how a Docker image is built and stored in Amazon ECR, then deployed as a Lambda function. The function is invoked with test data, runs inside the Lambda-managed container, and returns the results.

    Building the Container

    I built the Docker container for the application and tagged it with the repository name. The container was designed to check SSL certificates for a set of domains.

Once built, I pushed the container image to Amazon ECR so that Lambda could pull and run it.

Running the Container Locally

Before deploying to Lambda, I tested the container locally by running it and sending requests to its exposed endpoint. This confirmed that the container was functional and produced the expected output.

Deploying to AWS Lambda

I then created a new Lambda function with Container Image as the deployment option. I selected the ssltester-lambda image from ECR and deployed it.

After deployment, I tested the function by providing a list of domains as input. The function executed successfully, verifying SSL status for each domain and returning the results.

Scaling the Function

Because the function was deployed on AWS Lambda with container image support, it automatically scaled based on the number of invocations without requiring any manual configuration.

Takeaways

This project helped me gain hands-on experience with running containers in AWS Lambda. I learned how to:

  • Build and tag Docker images for use with AWS services
  • Push container images to Amazon ECR
  • Deploy containers directly to AWS Lambda using container image support
  • Test and validate serverless containers locally before deploying
  • Manage IAM roles and clean up resources after deployment

This project demonstrated how Lambda can serve as a lightweight, serverless runtime for containerized applications, bridging Docker workflows with serverless compute.