Skip to content

Conversation

@viren-nadkarni
Copy link
Member

@viren-nadkarni viren-nadkarni commented Dec 1, 2025

Motivation

In collaboration with AWS, we launch first-day support for Lambda Managed Instances at LocalStack.

Changes

  • Add Lambda preview API specs
  • Add Lambda API integrations for Lambda Managed Instances
  • Patch Lambda CloudFormation provider for new capacity provider
  • Extend Lambda lifecycle for Lambda Managed Instances
  • Revalidate Lambda tests

Limitations

  • No EC2 instances are created - Unlike the AWS cloud, LocalStack won’t create any emulated EC2 instances when you specify a capacity provider. We continue to run Lambda functions inside containers running on your local machine. This means that querying the EC2 service won’t show any new EC2 instances, and your Lambda functions won’t run within the specified VPC. We have not implemented these features, as we don’t believe they’re useful for local testing.
  • Scaling configuration - Any parameters you specify to set the sizing/scaling parameters are stored by LocalStack, and can be retrieved by querying APIs. However, they have no effect in scaling the number of EC2 instances (there are none!). We simply run Lambda functions inside containers on your local machine.
  • IAM Permissions are not enforced - A Capacity Provider is configured with an Operator Role, but the permissions are not enforced by LocalStack. It’s important you check the AWS documentation to ensure you’ve configured this role correctly.
  • Multi-concurrency - As mentioned earlier, one of the key benefits of Lambda Managed Instances is enabling the multi-concurrency execution model, allowing for multiple function executions to be running within the same Lambda environment. This moves away from the one-thread-per-lambda assumption, to instead requiring that code be thread-safe. We plan to support multi-concurrency at a later time.

Tests

Full CI run (without test selection): https://github.com/localstack/localstack/actions/runs/19814254371

Related

  • Part of DRG-37

Co-authored-by: Anisa Oshafi <[email protected]>
Co-authored-by: Cristopher Pinzón <[email protected]>
Co-authored-by: Alexander Rashed <[email protected]>
Co-authored-by: Dominik Schubert <[email protected]>
Co-authored-by: Mathieu Cloutier <[email protected]>
Co-authored-by: Simon Walker <[email protected]>
@viren-nadkarni viren-nadkarni added semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases docs: needed Pull request requires documentation updates notes: needed Pull request should be mentioned in the release notes labels Dec 1, 2025
@github-actions
Copy link

github-actions bot commented Dec 1, 2025

Test Results - Preflight, Unit

22 685 tests  +16   20 917 ✅ +16   6m 28s ⏱️ -7s
     1 suites ± 0    1 768 💤 ± 0 
     1 files   ± 0        0 ❌ ± 0 

Results for commit 654aa87. ± Comparison against base commit 42ed9a1.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Dec 1, 2025

Test Results (amd64) - Acceptance

7 tests  ±0   5 ✅ ±0   3m 19s ⏱️ -11s
1 suites ±0   2 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit 654aa87. ± Comparison against base commit 42ed9a1.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Dec 1, 2025

Test Results (arm64) - Acceptance

7 tests  ±0   5 ✅ ±0   3m 17s ⏱️ -16s
1 suites ±0   2 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit 654aa87. ± Comparison against base commit 42ed9a1.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Dec 1, 2025

Test Results - Alternative Providers

1 265 tests   - 198   730 ✅  - 110   36m 14s ⏱️ - 1m 6s
    4 suites  -   1   535 💤  -  88 
    4 files    -   1     0 ❌ ±  0 

Results for commit 654aa87. ± Comparison against base commit 42ed9a1.

This pull request removes 198 tests.
tests.aws.services.sns.test_sns.TestSNSCertEndpoint ‑ test_cert_endpoint_host[]
tests.aws.services.sns.test_sns.TestSNSCertEndpoint ‑ test_cert_endpoint_host[sns.us-east-1.amazonaws.com]
tests.aws.services.sns.test_sns.TestSNSMultiAccounts ‑ test_cross_account_access
tests.aws.services.sns.test_sns.TestSNSMultiAccounts ‑ test_cross_account_publish_to_sqs
tests.aws.services.sns.test_sns.TestSNSMultiRegions ‑ test_cross_region_access
tests.aws.services.sns.test_sns.TestSNSMultiRegions ‑ test_cross_region_delivery_sqs
tests.aws.services.sns.test_sns.TestSNSPlatformApplicationCrud ‑ test_create_platform_application
tests.aws.services.sns.test_sns.TestSNSPlatformApplicationCrud ‑ test_create_platform_application_invalid_attributes[missing-credential]
tests.aws.services.sns.test_sns.TestSNSPlatformApplicationCrud ‑ test_create_platform_application_invalid_attributes[missing-principal]
tests.aws.services.sns.test_sns.TestSNSPlatformApplicationCrud ‑ test_create_platform_application_invalid_attributes[no-args]
…

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Dec 1, 2025

Test Results (amd64) - Integration, Bootstrap

    5 files  ±0      5 suites  ±0   2h 40m 34s ⏱️ - 1m 34s
5 477 tests +1  4 924 ✅  - 1  552 💤 +1  1 ❌ +1 
5 483 runs  +1  4 924 ✅  - 1  558 💤 +1  1 ❌ +1 

For more details on these failures, see this check.

Results for commit 654aa87. ± Comparison against base commit 42ed9a1.

This pull request skips 1 test.
tests.aws.services.lambda_.test_lambda_api.TestLambdaRevisions ‑ test_function_revisions_permissions

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Dec 1, 2025

Test Results (arm64) - Integration

    4 files  ±0      4 suites  ±0   2h 35m 36s ⏱️ - 4m 33s
5 453 tests +1  4 900 ✅ ±0  553 💤 +1  0 ❌ ±0 
5 459 runs  +1  4 900 ✅ ±0  559 💤 +1  0 ❌ ±0 

Results for commit 654aa87. ± Comparison against base commit 42ed9a1.

This pull request skips 1 test.
tests.aws.services.lambda_.test_lambda_api.TestLambdaRevisions ‑ test_function_revisions_permissions

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Dec 1, 2025

LocalStack Community integration with Pro

    2 files  ±0      2 suites  ±0   2h 2m 6s ⏱️ - 1m 10s
5 103 tests +1  4 711 ✅ ±0  392 💤 +1  0 ❌ ±0 
5 105 runs  +1  4 711 ✅ ±0  394 💤 +1  0 ❌ ±0 

Results for commit 654aa87. ± Comparison against base commit 42ed9a1.

This pull request skips 1 test.
tests.aws.services.lambda_.test_lambda_api.TestLambdaRevisions ‑ test_function_revisions_permissions

♻️ This comment has been updated with latest results.

@joe4dev joe4dev marked this pull request as ready for review December 1, 2025 07:47
@joe4dev joe4dev requested a review from anisaoshafi December 1, 2025 07:47
Copy link
Contributor

@anisaoshafi anisaoshafi left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks 👏🏼

@joe4dev
Copy link
Member

joe4dev commented Dec 1, 2025

tests_scheduled_rule_does_not_trigger_on_put_events (tests.aws.services.events.test_events_schedule.TestScheduleCron) failed seems an unrelated flake reported from the full CI run here: https://github.com/localstack/localstack/actions/runs/19814254371/job/56763349333

👉 We're going ahead with the merge 🚀

@joe4dev joe4dev merged commit 4417e3b into main Dec 1, 2025
94 of 96 checks passed
@joe4dev joe4dev deleted the feature/lambda-managed-instances branch December 1, 2025 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs: needed Pull request requires documentation updates notes: needed Pull request should be mentioned in the release notes semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants