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
Api: Call function.currentVersion to work around CDK issue #1020
base: master
Are you sure you want to change the base?
Conversation
packages/resources/src/Function.ts
Outdated
|
||
// Fixes CDK issue with Provisioned Concurrency and Lambda Versions | ||
// cf. https://github.com/aws/aws-cdk/issues/13731#issuecomment-814801449 | ||
this.currentVersion; |
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.
Don't think we should always calling this.currentVersion
. @thdxr can you confirm on this?
@@ -339,6 +339,23 @@ test("timeout-class", async () => { | |||
); | |||
}); | |||
|
|||
test("provisioned-concurrency", async () => { | |||
const stack = new Stack(new App(), "stack"); | |||
const foo = new Function(stack, "Function", { |
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.
foo never used
}) | ||
); | ||
}); | ||
|
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.
Let's also test AWS::Lambda::Version
not created if concurrency is not configured.
Fix bug (no version when concurrency not set)
Fixes #1001.