{"id":812463,"date":"2026-01-07T10:51:40","date_gmt":"2026-01-07T09:51:40","guid":{"rendered":"https:\/\/www.devoteam.com\/expert-view\/ai-inference-using-aws-lambda-containers\/"},"modified":"2026-02-05T11:05:15","modified_gmt":"2026-02-05T10:05:15","slug":"ai-inference-using-aws-lambda-containers","status":"publish","type":"expert-view","link":"https:\/\/devoteam.info\/be\/expert-view\/ai-inference-using-aws-lambda-containers\/","title":{"rendered":"Cutting costs on AI inference using AWS Lambda Containers"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">AWS Lambda has long been synonymous with small, lightweight, event-driven functions. &nbsp;For years, the advice has been clear: steer clear of Lambda for containerised workloads due to slow cold starts, opting instead for more traditional services like Amazon ECS (Elastic Container Services).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However,<strong> some dramatic advancements in AWS Lambda\u2019s container loading capabilities have changed the game. It\u2019s now a genuinely viable, cost-effective solution for more demanding tasks like AI inference.<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-the-biggest-hurdle\">The biggest hurdle?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Containers are typically much bigger than traditional lambda functions, meaning a lot more data to transmit. The team at AWS came up with a cunning strategy for handling this, improving cold starts by up to 15 times.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-s-the-secret-sauce\">What\u2019s the secret sauce?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">It turns out that most containers aren&#8217;t as unique as we might think. Many share common foundations, such as Alpine or AWS base images, with some libraries added on top. In fact, only about 1% of each container is truly unique! By breaking containers down into chunks, AWS achieves massive deduplication. Think of it like building with LEGOs. Many projects use the same basic bricks, and you only need to store those bricks once.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The chunks are stored in S3 with multi-tier caching in data centers and local workers. This caching strategy significantly increases the probability that, even during a cold start, the vast majority of the necessary data is immediately available, leading to much faster function initialisation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Crucially, it turns out that, on average, less than 10% of a container&#8217;s data is actually needed at startup. This enables on-demand loading, where AWS Lambda only fetches the specific data required at that moment, dramatically accelerating cold starts for large container images (can be up to 10GB).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Curious about the nitty-gritty? Here&#8217;s how AWS pulls it off:<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-medium-font-size\" id=\"h-deterministic-serialisation-and-chunking\">Deterministic Serialisation and Chunking<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">When you create or update a function, your container images (typically composed of multiple layers) are flattened into a single `ext4` filesystem for consistent processing. This flattened filesystem is then divided into fixed-size 512KiB chunks. This process ensures that identical files or even parts of files consistently always generate the same chunks. Consistency is fundamental, enabling powerful caching and massive deduplication.<br><\/p>\n\n\n\n<h3 class=\"wp-block-heading has-medium-font-size\" id=\"h-convergent-encryption-for-secure-deduplication\">Convergent Encryption for Secure Deduplication<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">AWS Lambda uses a sophisticated technique called Convergent Encryption. This allows them to securely deduplicate and share container image chunks across <em>all<\/em> customers without compromising security. Each 512KiB chunk is hashed (using SHA256) to create a unique encryption key, which then encrypts the chunk. A manifest file, listing the hash and file offset of each chunk, has its key list encrypted with a unique, per-customer key managed by AWS KMS. What does this mean for you? Identical chunks can be stored and cached just once, enabling safe sharing even if they belong to different customers. Plus, a varying &#8220;salt&#8221; in the key derivation adds an extra layer of protection, limiting the &#8220;blast radius&#8221; if highly popular chunks ever encounter issues, by creating different keys for otherwise identical chunks.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-the-cost-cutting-edge\">The Cost-Cutting Edge<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Container-based Lambdas can now actually offer quicker cold starts than zip-based Lambdas, with <a href=\"https:\/\/aaronstuyvenberg.com\/posts\/containers-on-lambda\" target=\"_blank\" rel=\"noreferrer noopener\">performance tests<\/a> suggesting that this occurs in the 50MB-100MB range.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Lambda\u2019s per-millisecond billing model is ideal for sporadic workloads with long idle periods. One <a href=\"https:\/\/aws.plainenglish.io\/how-we-cut-ai-inference-costs-by-95-using-aws-lambda-17b13984f14a\" target=\"_blank\" rel=\"noreferrer noopener\">report highlights a 95% cost reduction<\/a> by migrating an AI Inference solution with very low traffic from ECS to Lambda.\u00a0<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Want to learn more? Dive into the details with the official <a href=\"https:\/\/assets.amazon.science\/25\/06\/d2e5ea9c411c9e4d366aa2fbbca5\/on-demand-container-loading-in-aws-lambda.pdf\" target=\"_blank\" rel=\"noreferrer noopener\">On-demand Container Loading in AWS Lambda white paper<\/a> and start rethinking your architecture.<\/p>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-group alignfull has-base-color has-text-color has-global-padding is-layout-constrained wp-container-core-group-is-layout-46b67d08 wp-block-group-is-layout-constrained has-background\" style=\"margin-top:0px;margin-bottom:0px;padding-top:var(--wp--preset--spacing--xxx-large);padding-right:var(--wp--preset--spacing--medium);padding-bottom:var(--wp--preset--spacing--xxx-large);padding-left:var(--wp--preset--spacing--medium);background-image:url(&apos;https:\/\/devoteam.info\/wp-content\/uploads\/2025\/01\/GettyImages-1309018761-scaled-1.jpg&apos;);background-size:cover;\">\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\">\n<div class=\"wp-block-group has-global-padding is-content-justification-left is-layout-constrained wp-container-core-group-is-layout-5f9de3d0 wp-block-group-is-layout-constrained\">\n<h2 class=\"wp-block-heading has-text-align-left has-secondary-font-family has-large-font-size\" id=\"h-how-will-you-transform-your-business-with-aws-solutions\">How will you transform your business with AWS solutions?<\/h2>\n<\/div>\n\n\n\n<p class=\"has-text-align-left has-main-accent-color has-text-color wp-block-paragraph\">Regardless of your current cloud adoption stage, our team will help you to streamline IT investments, enhance scalability, and drive innovation.<\/p>\n\n\n\n<div class=\"wp-block-buttons is-content-justification-left is-layout-flex wp-container-core-buttons-is-layout-3c38c079 wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/devoteam.info\/amazon-web-services\/\">Begin your AWS Journey<\/a><\/div>\n\n\n\n<div class=\"wp-block-button is-style-outline-white-button\"><a class=\"wp-block-button__link has-base-color has-text-color has-background wp-element-button\" href=\"https:\/\/devoteam.info\/success-story\/?topic_name=aws\" style=\"background-color:#64648254\">See how we helped others<\/a><\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>AWS Lambda has long been synonymous with small, lightweight, event-driven functions. &nbsp;For years, the advice has been clear: steer clear of Lambda for containerised workloads due to slow cold starts, opting instead for more traditional services like Amazon ECS (Elastic Container Services). However, some dramatic advancements in AWS Lambda\u2019s container loading capabilities have changed the [&hellip;]<\/p>\n","protected":false},"featured_media":804546,"template":"","categories":[890,1057],"tags":[],"industry":[],"class_list":["post-812463","expert-view","type-expert-view","status-publish","has-post-thumbnail","hentry","category-ai","category-aws"],"acf":[],"cards":"\n\t<div class=\"single-post-card\">\n\n\t\t<figure class=\"wp-block-post-featured-image\"><a href=\"https:\/\/devoteam.info\/be\/expert-view\/ai-inference-using-aws-lambda-containers\/\" target=\"_self\" ><img width=\"956\" height=\"434\" src=\"https:\/\/devoteam.info\/wp-content\/uploads\/2026\/01\/AWS-Lambda-Containers.jpg\" class=\"attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"Cutting costs on AI inference using AWS Lambda Containers\" style=\"aspect-ratio:4\/3;width:100%;object-fit:cover;\" decoding=\"async\" loading=\"lazy\" srcset=\"https:\/\/devoteam.info\/wp-content\/uploads\/2026\/01\/AWS-Lambda-Containers.jpg 956w, https:\/\/devoteam.info\/wp-content\/uploads\/2026\/01\/AWS-Lambda-Containers-300x136.jpg 300w, https:\/\/devoteam.info\/wp-content\/uploads\/2026\/01\/AWS-Lambda-Containers-768x349.jpg 768w\" sizes=\"auto, (max-width: 956px) 100vw, 956px\" \/><\/a><\/figure>\n\n\t\t\n\t\t<div class=\"wp-block-group is-vertical is-layout-flex wp-container-core-group-is-layout-43282307 wp-block-group-is-layout-flex\">\n\t<p style=\"font-style:normal;font-weight:700\" class=\"has-link-color wp-elements-1 wp-block-lp-post-type has-text-color has-primary-color has-small-font-size\">Expert View<\/p>\n\n\t\t\n\t\t<h3 style=\"font-style:normal;font-weight:400\" class=\"wp-block-post-title has-base-font-size\"><a href=\"https:\/\/devoteam.info\/be\/expert-view\/ai-inference-using-aws-lambda-containers\/\" target=\"_self\" >Cutting costs on AI inference using AWS Lambda Containers<\/a><\/h3><\/div>\n\t\t\n\t<\/div>\n\n","yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.4 (Yoast SEO v28.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Cutting costs on AI inference using AWS Lambda Containers | Devoteam<\/title>\n<meta name=\"description\" content=\"AWS Lambda Containers now cut AI inference costs by 95% with 15x faster cold starts using smart chunking, caching, and on-demand loading.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/devoteam.info\/be\/expert-view\/ai-inference-using-aws-lambda-containers\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Cutting costs on AI inference using AWS Lambda Containers\" \/>\n<meta property=\"og:description\" content=\"AWS Lambda Containers now cut AI inference costs by 95% with 15x faster cold starts using smart chunking, caching, and on-demand loading.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/devoteam.info\/be\/expert-view\/ai-inference-using-aws-lambda-containers\/\" \/>\n<meta property=\"og:site_name\" content=\"Devoteam\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-05T10:05:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/devoteam.info\/wp-content\/uploads\/2026\/01\/AWS-Lambda-Containers.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"956\" \/>\n\t<meta property=\"og:image:height\" content=\"434\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/devoteam.info\\\/be\\\/expert-view\\\/ai-inference-using-aws-lambda-containers\\\/\",\"url\":\"https:\\\/\\\/devoteam.info\\\/be\\\/expert-view\\\/ai-inference-using-aws-lambda-containers\\\/\",\"name\":\"Cutting costs on AI inference using AWS Lambda Containers | Devoteam\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/devoteam.info\\\/be\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/devoteam.info\\\/be\\\/expert-view\\\/ai-inference-using-aws-lambda-containers\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/devoteam.info\\\/be\\\/expert-view\\\/ai-inference-using-aws-lambda-containers\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/devoteam.info\\\/wp-content\\\/uploads\\\/2026\\\/01\\\/AWS-Lambda-Containers.jpg\",\"datePublished\":\"2026-01-07T09:51:40+00:00\",\"dateModified\":\"2026-02-05T10:05:15+00:00\",\"description\":\"AWS Lambda Containers now cut AI inference costs by 95% with 15x faster cold starts using smart chunking, caching, and on-demand loading.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/devoteam.info\\\/be\\\/expert-view\\\/ai-inference-using-aws-lambda-containers\\\/#breadcrumb\"},\"inLanguage\":\"en-BE\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/devoteam.info\\\/be\\\/expert-view\\\/ai-inference-using-aws-lambda-containers\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-BE\",\"@id\":\"https:\\\/\\\/devoteam.info\\\/be\\\/expert-view\\\/ai-inference-using-aws-lambda-containers\\\/#primaryimage\",\"url\":\"https:\\\/\\\/devoteam.info\\\/wp-content\\\/uploads\\\/2026\\\/01\\\/AWS-Lambda-Containers.jpg\",\"contentUrl\":\"https:\\\/\\\/devoteam.info\\\/wp-content\\\/uploads\\\/2026\\\/01\\\/AWS-Lambda-Containers.jpg\",\"width\":956,\"height\":434,\"caption\":\"AWS Lambda Containers\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/devoteam.info\\\/be\\\/expert-view\\\/ai-inference-using-aws-lambda-containers\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/devoteam.info\\\/be\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Expert View\",\"item\":\"https:\\\/\\\/devoteam.info\\\/be\\\/expert-view\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Cutting costs on AI inference using AWS Lambda Containers\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/devoteam.info\\\/be\\\/#website\",\"url\":\"https:\\\/\\\/devoteam.info\\\/be\\\/\",\"name\":\"Devoteam\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/devoteam.info\\\/be\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-BE\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Cutting costs on AI inference using AWS Lambda Containers | Devoteam","description":"AWS Lambda Containers now cut AI inference costs by 95% with 15x faster cold starts using smart chunking, caching, and on-demand loading.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/devoteam.info\/be\/expert-view\/ai-inference-using-aws-lambda-containers\/","og_locale":"en_US","og_type":"article","og_title":"Cutting costs on AI inference using AWS Lambda Containers","og_description":"AWS Lambda Containers now cut AI inference costs by 95% with 15x faster cold starts using smart chunking, caching, and on-demand loading.","og_url":"https:\/\/devoteam.info\/be\/expert-view\/ai-inference-using-aws-lambda-containers\/","og_site_name":"Devoteam","article_modified_time":"2026-02-05T10:05:15+00:00","og_image":[{"width":956,"height":434,"url":"https:\/\/devoteam.info\/wp-content\/uploads\/2026\/01\/AWS-Lambda-Containers.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/devoteam.info\/be\/expert-view\/ai-inference-using-aws-lambda-containers\/","url":"https:\/\/devoteam.info\/be\/expert-view\/ai-inference-using-aws-lambda-containers\/","name":"Cutting costs on AI inference using AWS Lambda Containers | Devoteam","isPartOf":{"@id":"https:\/\/devoteam.info\/be\/#website"},"primaryImageOfPage":{"@id":"https:\/\/devoteam.info\/be\/expert-view\/ai-inference-using-aws-lambda-containers\/#primaryimage"},"image":{"@id":"https:\/\/devoteam.info\/be\/expert-view\/ai-inference-using-aws-lambda-containers\/#primaryimage"},"thumbnailUrl":"https:\/\/devoteam.info\/wp-content\/uploads\/2026\/01\/AWS-Lambda-Containers.jpg","datePublished":"2026-01-07T09:51:40+00:00","dateModified":"2026-02-05T10:05:15+00:00","description":"AWS Lambda Containers now cut AI inference costs by 95% with 15x faster cold starts using smart chunking, caching, and on-demand loading.","breadcrumb":{"@id":"https:\/\/devoteam.info\/be\/expert-view\/ai-inference-using-aws-lambda-containers\/#breadcrumb"},"inLanguage":"en-BE","potentialAction":[{"@type":"ReadAction","target":["https:\/\/devoteam.info\/be\/expert-view\/ai-inference-using-aws-lambda-containers\/"]}]},{"@type":"ImageObject","inLanguage":"en-BE","@id":"https:\/\/devoteam.info\/be\/expert-view\/ai-inference-using-aws-lambda-containers\/#primaryimage","url":"https:\/\/devoteam.info\/wp-content\/uploads\/2026\/01\/AWS-Lambda-Containers.jpg","contentUrl":"https:\/\/devoteam.info\/wp-content\/uploads\/2026\/01\/AWS-Lambda-Containers.jpg","width":956,"height":434,"caption":"AWS Lambda Containers"},{"@type":"BreadcrumbList","@id":"https:\/\/devoteam.info\/be\/expert-view\/ai-inference-using-aws-lambda-containers\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/devoteam.info\/be\/"},{"@type":"ListItem","position":2,"name":"Expert View","item":"https:\/\/devoteam.info\/be\/expert-view\/"},{"@type":"ListItem","position":3,"name":"Cutting costs on AI inference using AWS Lambda Containers"}]},{"@type":"WebSite","@id":"https:\/\/devoteam.info\/be\/#website","url":"https:\/\/devoteam.info\/be\/","name":"Devoteam","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/devoteam.info\/be\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-BE"}]}},"uagb_featured_image_src":{"full":["https:\/\/devoteam.info\/wp-content\/uploads\/2026\/01\/AWS-Lambda-Containers.jpg",956,434,false],"thumbnail":["https:\/\/devoteam.info\/wp-content\/uploads\/2026\/01\/AWS-Lambda-Containers-150x150.jpg",150,150,true],"medium":["https:\/\/devoteam.info\/wp-content\/uploads\/2026\/01\/AWS-Lambda-Containers-300x136.jpg",300,136,true],"medium_large":["https:\/\/devoteam.info\/wp-content\/uploads\/2026\/01\/AWS-Lambda-Containers-768x349.jpg",768,349,true],"large":["https:\/\/devoteam.info\/wp-content\/uploads\/2026\/01\/AWS-Lambda-Containers.jpg",956,434,false],"1536x1536":["https:\/\/devoteam.info\/wp-content\/uploads\/2026\/01\/AWS-Lambda-Containers.jpg",956,434,false],"2048x2048":["https:\/\/devoteam.info\/wp-content\/uploads\/2026\/01\/AWS-Lambda-Containers.jpg",956,434,false]},"uagb_author_info":{"display_name":"julien.lemarchal","author_link":"https:\/\/devoteam.info\/be\/author\/"},"uagb_comment_info":0,"uagb_excerpt":"AWS Lambda has long been synonymous with small, lightweight, event-driven functions. &nbsp;For years, the advice has been clear: steer clear of Lambda for containerised workloads due to slow cold starts, opting instead for more traditional services like Amazon ECS (Elastic Container Services). However, some dramatic advancements in AWS Lambda\u2019s container loading capabilities have changed the&hellip;","_links":{"self":[{"href":"https:\/\/devoteam.info\/be\/wp-json\/wp\/v2\/expert-view\/812463","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devoteam.info\/be\/wp-json\/wp\/v2\/expert-view"}],"about":[{"href":"https:\/\/devoteam.info\/be\/wp-json\/wp\/v2\/types\/expert-view"}],"version-history":[{"count":1,"href":"https:\/\/devoteam.info\/be\/wp-json\/wp\/v2\/expert-view\/812463\/revisions"}],"predecessor-version":[{"id":833548,"href":"https:\/\/devoteam.info\/be\/wp-json\/wp\/v2\/expert-view\/812463\/revisions\/833548"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devoteam.info\/be\/wp-json\/wp\/v2\/media\/804546"}],"wp:attachment":[{"href":"https:\/\/devoteam.info\/be\/wp-json\/wp\/v2\/media?parent=812463"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devoteam.info\/be\/wp-json\/wp\/v2\/categories?post=812463"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devoteam.info\/be\/wp-json\/wp\/v2\/tags?post=812463"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/devoteam.info\/be\/wp-json\/wp\/v2\/industry?post=812463"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}