-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add CloudFormation Lambda Version Provisioned Concurrency #12594
Conversation
There was a problem hiding this 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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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).
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
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.test_lambda_version
to validate actual behavior for provisioned concurrency (fixed in Fix provisioned concurrency set on Lambda alias #12592)