Maciej Winnicki
Feb 24, 2017 · 1 min read

AWS Lambda containers run on c4.large instances (FYI, few months ago they were c3.large). c4.large have 3.75GB memory available so there can be many Lambdas (even with different mem limit) running on a single instance (binpack). It may happen that Lambda (container) is scheduled on a instance not completely saturated. CPU is limited not by speed but by shares (relative weigh). If there is only one container running on a instance it will have access to all CPU resources even though it may be 128MB Lambda.

More info about how CPU shares work in containers: https://goldmann.pl/blog/2014/09/11/resource-management-in-docker/#_cpu

    Maciej Winnicki

    Written by

    Serverless all the things!