Skip to content

Make Lambda reusable for CloudFront Lambda@Edge #12409

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 25, 2025

Conversation

joe4dev
Copy link
Member

@joe4dev joe4dev commented Mar 19, 2025

Motivation

CloudFront Lambda@Edge requires some changes in Lambda to be able to re-use the existing Lambda infrastructure.

Changes

  • Make the Lambda Function object optional in counting_service::get_invocation_lease such that we can re-use the counting service for Lambda@Edge, and skip reserved and provisioned concurrency
  • Track version state in the version manager (i.e., fix unused self.state field)
  • Refactor version manager such that the optional function is only used for the counting service

@joe4dev joe4dev added the semver: patch Non-breaking changes which can be included in patch releases label Mar 19, 2025
@joe4dev joe4dev added this to the Playground milestone Mar 19, 2025
@joe4dev joe4dev self-assigned this Mar 19, 2025
@joe4dev joe4dev force-pushed the spike-cloudfront-lambda-at-edge branch from c484845 to d40be45 Compare March 20, 2025 17:18
Copy link

github-actions bot commented Mar 20, 2025

LocalStack Community integration with Pro

    2 files  ±0      2 suites  ±0   1h 55m 9s ⏱️ + 2m 47s
4 305 tests ±0  3 984 ✅ ±0  321 💤 ±0  0 ❌ ±0 
4 307 runs  ±0  3 984 ✅ ±0  323 💤 ±0  0 ❌ ±0 

Results for commit e1bae6d. ± Comparison against base commit 4f5c1ba.

♻️ This comment has been updated with latest results.

@joe4dev joe4dev marked this pull request as ready for review March 20, 2025 19:06
@joe4dev joe4dev force-pushed the spike-cloudfront-lambda-at-edge branch from d40be45 to 39a6cf9 Compare March 21, 2025 17:49
@joe4dev joe4dev requested a review from thrau as a code owner March 23, 2025 19:07
Copy link

github-actions bot commented Mar 23, 2025

S3 Image Test Results (AMD64 / ARM64)

  2 files  ±0    2 suites  ±0   8m 54s ⏱️ -15s
486 tests ±0  436 ✅ ±0   50 💤 ±0  0 ❌ ±0 
972 runs  ±0  872 ✅ ±0  100 💤 ±0  0 ❌ ±0 

Results for commit e1bae6d. ± Comparison against base commit 4f5c1ba.

♻️ This comment has been updated with latest results.

@joe4dev joe4dev force-pushed the spike-cloudfront-lambda-at-edge branch from 180f008 to 40b0040 Compare March 24, 2025 18:12
Copy link
Member

@dfangl dfangl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! As discussed a bit hacky, but the best we can do for now!

@joe4dev joe4dev force-pushed the spike-cloudfront-lambda-at-edge branch from 40b0040 to e1bae6d Compare March 25, 2025 14:37
@joe4dev joe4dev merged commit 27fc564 into master Mar 25, 2025
38 checks passed
@joe4dev joe4dev deleted the spike-cloudfront-lambda-at-edge branch March 25, 2025 16:25
@joe4dev joe4dev modified the milestones: Playground, 4.3 Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver: patch Non-breaking changes which can be included in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants