Should I migrate/start using Container Images with AWS Lambda Functions?

Terence Nero
2 min readJan 18, 2021

--

AWS recently announced Container Image Support for Lambda during AWS re:Invent 2020.

What does it mean to developers?

One of the main benefits for developers is the ability to run larger workloads. A container-based deployment package can now be up to 10 GB in size. This opens up a plethora of many new workload possibilities, primarily for applications with heavy dependencies or heavy data processing. For machine learning or data analytics, this allows developers to take advantage of the benefits of serverless compute. If you use Pandas, NumPy, and similar libraries, the previous 250 MB deployment package limit prevented many workloads from using AWS Lambda.

Apart from the package size, there are many other benefits. But I will leave that for you to discover :thinking:

Does this mean we start moving to containers immediately?

I would suggest going through the articles attached below, understand the benefits and evaluate if they can help your use-case and if yes then plan to migrate existing functions or start developing new functions with containers.

Caution

Just because you can now package up to 10 GB of code and dependencies does not me you start building heavy lambda functions that perform multiple tasks. This will lead to you building a monolith function that goes against the philosophy or intended use of FaaS. And it will lead to longer start times (Cold start), which can be mitigated with Provisioned Concurrency. But still, keep your functions light as possible.

References

--

--

Terence Nero

Principal Engineer at Cuelogic Technologies. Specialized in developing end to end Serverless solutions on AWS.