From ec54a906a554c02d605a5adaf4618993fe236dce Mon Sep 17 00:00:00 2001 From: Calvin Combs <66279577+comcalvi@users.noreply.github.com> Date: Fri, 8 Jul 2022 17:14:19 -0600 Subject: [PATCH] fix(custom-resources): Custom resource provider framework not passing `ResponseURL` to user function (#21065) #20889 included a change that broke the custom resource framework by not including the necessary presigned URL. This includes the presigned URL, and fixes the issue. This PR does not include test changes because this is the runtime code. Closes #21058 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../lib/provider-framework/runtime/framework.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/@aws-cdk/custom-resources/lib/provider-framework/runtime/framework.ts b/packages/@aws-cdk/custom-resources/lib/provider-framework/runtime/framework.ts index 97b7c4de61e4b..f9586e032ae5f 100644 --- a/packages/@aws-cdk/custom-resources/lib/provider-framework/runtime/framework.ts +++ b/packages/@aws-cdk/custom-resources/lib/provider-framework/runtime/framework.ts @@ -105,9 +105,7 @@ async function invokeUserFunction(functionArnE // automatically by the JavaScript SDK. const resp = await invokeFunction({ FunctionName: functionArn, - - // Strip 'ResponseURL' -- the downstream CR doesn't need it and can only log it by accident - Payload: JSON.stringify({ ...sanitizedPayload, ResponseURL: undefined }), + Payload: JSON.stringify(sanitizedPayload), }); log('user function response:', resp, typeof(resp));