Skip to content

Commit

Permalink
fix(custom-resources): Custom resource provider framework not passing…
Browse files Browse the repository at this point in the history
… `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*
  • Loading branch information
comcalvi committed Jul 8, 2022
1 parent b67950d commit f7b25b6
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,7 @@ async function invokeUserFunction<A extends { ResponseURL: '...' }>(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));
Expand Down

0 comments on commit f7b25b6

Please sign in to comment.