Skip to content

Commit

Permalink
fix(custom-resources): State functionActiveV2 not found (#25228)
Browse files Browse the repository at this point in the history
Replaces `functionActiveV2` with `functionActive`. 

`functionActiveV2` is not available in SDK versions < 2.1080.0, but the one that Lambda currently installs by default is 2.1055.0. The version that Lambda installs by default is the same that the CDK uses.

Closes #24358

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
comcalvi authored Apr 20, 2023
1 parent a9ecff3 commit 13a230e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,12 @@ async function defaultInvokeFunction(req: AWS.Lambda.InvocationRequest): Promise
* Exits the loop on 'Active' state and throws an error on 'Inactive' or 'Failed'.
*
* And now we wait.
*
* Use functionActive instead of functionActiveV2, since functionActiveV2 is only
* available on SDK 2.1080.0 and up, Lambda installs 2.1055.0 by default,
* and we use the SDK version that Lambda includes by default.
*/
await lambda.waitFor('functionActiveV2', {
await lambda.waitFor('functionActive', {
FunctionName: req.FunctionName,
}).promise();
return await lambda.invoke(req).promise();
Expand Down

0 comments on commit 13a230e

Please sign in to comment.