<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/day-5-30-aws-system-design-patterns-ztc1tfj43" -->

---
title: Day 5/30 AWS System Design Patterns | daily.dev
description: A checkout API on AWS Lambda with VPC attachment was experiencing P99 latency spikes of 3.8s on Monday mornings due to cold starts. The team enabled...
canonical: https://daily.dev/posts/day-5-30-aws-system-design-patterns-ztc1tfj43
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Day 5/30 AWS System Design Patterns | daily.dev
og:description: A checkout API on AWS Lambda with VPC attachment was experiencing P99 latency spikes of 3.8s on Monday mornings due to cold starts. The team enabled...
og:url: https://daily.dev/posts/day-5-30-aws-system-design-patterns-ztc1tfj43
og:image: https://api.daily.dev/og/posts/ZTC1TFJ43.png
og:image:alt: Day 5/30 AWS System Design Patterns
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Day 5/30 AWS System Design Patterns

**[Joud Awad](https://daily.dev/sources/iac4jsbu0lv8wbsc85fsh)** · [@joudawad](https://daily.dev/joudawad) · 2 min read · 91 upvotes · 13 comments

## Summary

A checkout API on AWS Lambda with VPC attachment was experiencing P99 latency spikes of 3.8s on Monday mornings due to cold starts. The team enabled Provisioned Concurrency with 10 pre-initialized environments at ~$110/month extra, but P99 still spiked to 3.1s. CloudWatch showed 0 invocations on the provisioned environments during the spike. The root cause is that Provisioned Concurrency cannot be applied to the $LATEST version — it must target a published version or alias, and the event source must invoke that specific version or alias for the warm pool to be used.

## Content

A checkout API runs on Lambda _(serverless compute, Node.js, 1,024 MB, attached to a VPC for RDS access)_. Cold starts were causing P99 spikes of 3.8 seconds on Monday mornings when traffic ramps up after the weekend.

The team enabled Provisioned Concurrency _(pre-initializes a fixed number of execution environments so they are warm before requests arrive — billed per environment, around the clock, whether or not traffic uses them)_: 10 pre-initialized execution environments, configured to stay warm at all times. Additional monthly cost: approximately $110.

The following Monday, P99 still spiked — this time to 3.1 seconds on the first wave of requests. The provisioned environments showed 0 invocations in CloudWatch _(AWS monitoring service)_ during the spike window. The function was being invoked. The provisioned environments were running. Nothing was using them.

What went wrong?

A) 10 provisioned environments is not enough — the Monday spike requires at least 50 to absorb the concurrency burst

B) Provisioned Concurrency was configured on the `$LATEST` version _(the mutable, always-updating function version — Provisioned Concurrency cannot target it)_ — it must be applied to a published version or an alias pointing to one, and the event source must invoke that version or alias

C) The VPC attachment _(places Lambda inside the customer VPC for private resource access)_ is re-initializing the ENI on each provisioned environment at invocation time, overriding the warm state

D) Provisioned Concurrency requires the function to be behind API Gateway _(managed API layer)_ — direct invocation bypasses the warm pool

Answer in the comments.

#AWS #AWSLambda #Lambda #Serverless #LambdaAliasAndVersions

## Community discussion

Top comments from developers on daily.dev.

**@joudawad** · 13 upvotes

> The answer is B.
>
> Provisioned Concurrency _(pre-initializes environments, billed per environment regardless of traffic)_ cannot be applied to `$LATEST`. AWS requires you to configure it on a published version (e.g., version 12) or an alias _(a named pointer to a specific published version)_ that resolves to a published version. And the routing must match: if your event source — API Gateway _(managed API layer)_, ALB _(load balancer)_, Function URL — is invoking `$LATEST`, it invokes `$LATEST`. The provisioned pool attached to version 12 is never reached. The pre-initialized environments sit...

**@joudawad** · 5 upvotes

> D — Provisioned Concurrency works with any invocation path: API Gateway *(managed API layer)*, ALB *(load balancer)*, Function URLs, SDK direct invocation, and event source mappings. There is no gateway requirement. What every path shares is the actual requirement: it must invoke the version or alias that carries the provisioned configuration.

**@joudawad** · 5 upvotes

> A — The CloudWatch signal rules this out completely: 0 invocations on the provisioned config. Undersized capacity would show the pool saturated and overflowing — high utilization, spillover cold starts. A pool at zero is not too small; it is unreachable.

**@joudawad** · 5 upvotes

> C — VPC ENI attachment was a real cold start contributor before 2019, when AWS moved to a Hyperplane architecture with pre-provisioned ENIs shared across functions in the same VPC and subnet. For most workloads, VPC attachment *(places Lambda inside the customer VPC)* no longer adds meaningful cold start latency — and it would not explain warm environments receiving zero invocations.

**@joudawad** · 4 upvotes

> Also, it would mean a lot to me if you could support my content and stay in touch 🙏
>
> - YouTube: [https://www.youtube.com/@system-design-lab](https://www.youtube.com/@system-design-lab)
> - LinkedIn: [https://www.linkedin.com/in/joud-awad/](https://www.linkedin.com/in/joud-awad/)
> - Medium Blog: [https://joudwawad.medium.com/](https://joudwawad.medium.com/)
> - Substack: [https://joudawad.substack.com/](https://joudawad.substack.com/)

## Similar posts on daily.dev

- [Serverless Computing Architecture: Patterns, Tradeoffs & Decision Guide](https://daily.dev/posts/serverless-computing-architecture-patterns-tradeoffs-decision-guide-juttxofra) · Netguru · 0 upvotes · 0 comments

---

Tags: [#aws](https://daily.dev/tags/aws), [#career](https://daily.dev/tags/career), [#serverless](https://daily.dev/tags/serverless), [#aws-lambda](https://daily.dev/tags/aws-lambda)

[View this post on daily.dev](https://daily.dev/posts/day-5-30-aws-system-design-patterns-ztc1tfj43)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/day-5-30-aws-system-design-patterns-ztc1tfj43","headline":"Day 5/30 AWS System Design Patterns","text":"A checkout API on AWS Lambda with VPC attachment was experiencing P99 latency spikes of 3.8s on Monday mornings due to cold starts. The team enabled Provisioned Concurrency with 10 pre-initialized environments at ~$110/month extra, but P99 still spiked to 3.1s. CloudWatch showed 0 invocations on the provisioned environments during the spike. The root cause is that Provisioned Concurrency cannot be applied to the $LATEST version — it must target a published version or alias, and the event source must invoke that specific version or alias for the warm pool to be used.","url":"https://daily.dev/posts/day-5-30-aws-system-design-patterns-ztc1tfj43","datePublished":"2026-07-25T16:01:38.746Z","dateModified":"2026-09-13T21:33:43.899Z","author":{"@type":"Person","name":"Joud Awad","url":"https://daily.dev/joudawad","image":"https://media.daily.dev/image/upload/s--dOB9RaXY--/f_auto/v1773320801/avatars/avatar_iaC4JsBU0lV8wBsc85fSh?_a=BAMAMiiu0","description":"Principal Solution Architecture ","worksFor":{"@type":"Organization","name":"Metalab","logo":"https://www.google.com/s2/favicons?domain=metalab.com&sz=128"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":86100}},"image":"https://media.daily.dev/image/upload/s--1No2-Duz--/f_auto/v1784995319/posts/ZTC1TFJ43?_a=BAMAMicg0","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":91},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":13}],"comment":[{"@type":"Comment","text":"The answer is B.\nProvisioned Concurrency (pre-initializes environments, billed per environment regardless of traffic) cannot be applied to $LATEST. AWS requires you to configure it on a published version (e.g., version 12) or an alias (a named pointer to a specific published version) that resolves to a published version. And the routing must match: if your event source — API Gateway (managed API layer), ALB (load balancer), Function URL — is invoking $LATEST, it invokes $LATEST. The provisioned pool attached to version 12 is never reached. The pre-initialized environments sit warm, billed, and idle while $LATEST cold-starts in front of your users.\nCloudWatch (AWS monitoring service) confirms this directly: 0 invocations against the provisioned concurrency configuration while the function itself is being invoked. Warm capacity and live traffic are pointing at two different targets.\nThe fix: publish a version with aws lambda publish-version, configure Provisioned Concurrency against that version or an alias pointing to it, then update the API Gateway stage or ALB target to invoke the alias instead of $LATEST. The alias is the piece teams forget — it is what lets you shift the warm pool to a new version on deploy without touching the event source again.\nWorth knowing while you’re here: the money only works if the routing works. Ten warm environments at 1 GB run roughly $110/month in idle charges ($0.0000041667 per GB-second, around the clock) before any invocation costs. Misrouted, that is $110/month for a space heater.","datePublished":"2026-07-25T16:02:49.393Z","url":"https://daily.dev/posts/ZTC1TFJ43#c-aAVMyigjS","author":{"@type":"Person","name":"Joud Awad","url":"https://daily.dev/joudawad","image":"https://media.daily.dev/image/upload/s--dOB9RaXY--/f_auto/v1773320801/avatars/avatar_iaC4JsBU0lV8wBsc85fSh?_a=BAMAMiiu0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":13}},{"@type":"Comment","text":"D — Provisioned Concurrency works with any invocation path: API Gateway (managed API layer), ALB (load balancer), Function URLs, SDK direct invocation, and event source mappings. There is no gateway requirement. What every path shares is the actual requirement: it must invoke the version or alias that carries the provisioned configuration.","datePublished":"2026-07-25T16:03:14.900Z","url":"https://daily.dev/posts/ZTC1TFJ43#c-JUCSIsofA","author":{"@type":"Person","name":"Joud Awad","url":"https://daily.dev/joudawad","image":"https://media.daily.dev/image/upload/s--dOB9RaXY--/f_auto/v1773320801/avatars/avatar_iaC4JsBU0lV8wBsc85fSh?_a=BAMAMiiu0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":5}},{"@type":"Comment","text":"A — The CloudWatch signal rules this out completely: 0 invocations on the provisioned config. Undersized capacity would show the pool saturated and overflowing — high utilization, spillover cold starts. A pool at zero is not too small; it is unreachable.","datePublished":"2026-07-25T16:03:02.467Z","url":"https://daily.dev/posts/ZTC1TFJ43#c-SyqQjaek1","author":{"@type":"Person","name":"Joud Awad","url":"https://daily.dev/joudawad","image":"https://media.daily.dev/image/upload/s--dOB9RaXY--/f_auto/v1773320801/avatars/avatar_iaC4JsBU0lV8wBsc85fSh?_a=BAMAMiiu0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":5}},{"@type":"Comment","text":"C — VPC ENI attachment was a real cold start contributor before 2019, when AWS moved to a Hyperplane architecture with pre-provisioned ENIs shared across functions in the same VPC and subnet. For most workloads, VPC attachment (places Lambda inside the customer VPC) no longer adds meaningful cold start latency — and it would not explain warm environments receiving zero invocations.","datePublished":"2026-07-25T16:03:09.141Z","url":"https://daily.dev/posts/ZTC1TFJ43#c-ZCfq719hw","author":{"@type":"Person","name":"Joud Awad","url":"https://daily.dev/joudawad","image":"https://media.daily.dev/image/upload/s--dOB9RaXY--/f_auto/v1773320801/avatars/avatar_iaC4JsBU0lV8wBsc85fSh?_a=BAMAMiiu0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":5}},{"@type":"Comment","text":"Also, it would mean a lot to me if you could support my content and stay in touch 🙏\n\nYouTube: https://www.youtube.com/@system-design-lab\nLinkedIn: https://www.linkedin.com/in/joud-awad/\nMedium Blog: https://joudwawad.medium.com/\nSubstack: https://joudawad.substack.com/","datePublished":"2026-07-25T16:03:20.042Z","url":"https://daily.dev/posts/ZTC1TFJ43#c-W2szFmyQ2","author":{"@type":"Person","name":"Joud Awad","url":"https://daily.dev/joudawad","image":"https://media.daily.dev/image/upload/s--dOB9RaXY--/f_auto/v1773320801/avatars/avatar_iaC4JsBU0lV8wBsc85fSh?_a=BAMAMiiu0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":4}}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/sources/iac4jsbu0lv8wbsc85fsh","name":"Joud Awad"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Joud Awad","item":"https://daily.dev/sources/iac4jsbu0lv8wbsc85fsh"},{"@type":"ListItem","position":3,"name":"Day 5/30 AWS System Design Patterns"}]}
```

