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 (aws#21065)

aws#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 aws#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 authored and daschaa committed Jul 9, 2022
1 parent 979c080 commit ec54a90
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 ec54a90

Please sign in to comment.