10000 Add CloudFormation Lambda Version Provisioned Concurrency by joe4dev · Pull Request #12594 · localstack/localstack · GitHub
[go: up one dir, main page]

Skip to content

Add CloudFormation Lambda Version Provisioned Concurrency #12594

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

Conversation

joe4dev
Copy link
Member
@joe4dev joe4dev commented May 7, 2025

Depends on #12592

Motivation

Testing for a support issue revealed an auxiliary issue that provisioned concurrency is not implemented for the CloudFormation resource AWS::Lambda::Version.

Changes

  • Add support for provisioned concurrency config in the Lambda version CloudFormation resource provider
  • Add aws-validated test case test_lambda_version_provisioned_concurrency. I opted for creating a separate test case for provisioned concurrency to ensure both paths work independently, especially given that provisioned concurrency includes different waiters (takes much longer). Feel free to suggest if combining them would be better.
  • Improve test case test_lambda_version to validate actual behavior for provisioned concurrency (fixed in Fix provisioned concurrency set on Lambda alias #12592)

@joe4dev joe4dev added this to the 4.5 milestone May 7, 2025
@joe4dev joe4dev self-assigned this May 7, 2025
@joe4dev joe4dev added the semver: patch Non-breaking changes which can be included in patch releases label May 7, 2025
Copy link
github-actions bot commented May 7, 2025

LocalStack Community integration with Pro

    2 files  ±0      2 suites  ±0   1h 43m 36s ⏱️ +33s
4 403 tests +1  4 041 ✅ +1  362 💤 ±0  0 ❌ ±0 
4 405 runs  +1  4 041 ✅ +1  364 💤 ±0  0 ❌ ±0 

Results for commit b6ce157. ± Comparison against base commit fd727d5.

@joe4dev joe4dev marked this pull request as ready for review May 7, 2025 19:52
Copy link
Contributor
@simonrw simonrw left a comment

Choose a reason for hiding this comment

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

The change looks sensible to me. Just a question about an assertion but lgtm!

invoke_result = aws_client.lambda_.invoke(
FunctionName=function_name, Qualifier=alias_name, Payload=b"{}"
)
assert "FunctionError" not in invoke_result
Copy link
Contributor

Choose a reason for hiding this comment

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

q: do we still need this assertion of we are snapshotting the result?

Copy link
Member Author

Choose a reason for hiding this comment

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

The assertion is not strictly when it comes to AWS<->LS parity. However, we commonly clarify the intention for Lambda invokes (see Lambda test suite) because it's too/so easy to overlook a snapshot update, which contains a failing Lambda response (happened twice here).

@joe4dev joe4dev merged commit a7b4250 into master May 8, 2025
37 checks passed
@joe4dev joe4dev deleted the add-cloudformation-lambda-version-provisioned-concurrency branch May 8, 2025 13:07
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.

3 participants
0