Sivvie Lim
Sivvie Lim

Reputation: 1286

Is there a way to containerized a normal AWS Lambda function?

My AWS lambda functions have input from AWS SNS (Topic subscription) and output will go to CRUD in NoSQL Database (likewise MongoDB).

So currently I have the SNS & Lambda function setup in AWS Cloud and they are working fine. However, I would like to containerize the lambda function as well as the MongoDB database and host them on AWS EKS using Docker + Kubernetes service. (So the functions will be a Docker image)

I am totally new to this container thing and I searched online though I could not found any that mentions how to containerized AWS Lambda Functions.

Is this possible? If it is what are the ways to do it? Thank you.

Upvotes: 1

Views: 280

Answers (2)

Praveen Sripati
Praveen Sripati

Reputation: 33495

Lambda already uses Firecracker a microVM technology. So, not really sure why it's required to create a container out of Lambda.

The beauty of Lambda/Serverless is to simply write the function code and forget about the rest. If it's all about more control, then look at Knative which runs on top of K8S.

Upvotes: 0

Marcin
Marcin

Reputation: 238269

The docker environment for AWS lambda function already exist and it is lambci/lambda. So if you want to run/test your functions locally, this is the tool normally used for that:

A sandboxed local environment that replicates the live AWS Lambda environment almost identically – including installed software and libraries, file structure and permissions, environment variables, context objects and behaviors – even the user and running process are the same.

Since its open-sourced, you can also modify it if it does not suit your needs.

Upvotes: 1

Related Questions