Skip to content

Commit 13a230e

Browse files
authored
fix(custom-resources): State functionActiveV2 not found (#25228)
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*
1 parent a9ecff3 commit 13a230e

File tree

1 file changed

+5
-1
lines changed
  • packages/aws-cdk-lib/custom-resources/lib/provider-framework/runtime

1 file changed

+5
-1
lines changed

packages/aws-cdk-lib/custom-resources/lib/provider-framework/runtime/outbound.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,12 @@ async function defaultInvokeFunction(req: AWS.Lambda.InvocationRequest): Promise
6262
* Exits the loop on 'Active' state and throws an error on 'Inactive' or 'Failed'.
6363
*
6464
* And now we wait.
65+
*
66+
* Use functionActive instead of functionActiveV2, since functionActiveV2 is only
67+
* available on SDK 2.1080.0 and up, Lambda installs 2.1055.0 by default,
68+
* and we use the SDK version that Lambda includes by default.
6569
*/
66-
await lambda.waitFor('functionActiveV2', {
70+
await lambda.waitFor('functionActive', {
6771
FunctionName: req.FunctionName,
6872
}).promise();
6973
return await lambda.invoke(req).promise();

0 commit comments

Comments
 (0)