Skip to content

AwsCustomResource: Return response field from lambda backed custom resource #19833

Discussion options

You must be logged in to vote

@muhammadali2022skipq and everyone else who might be interested,

I have:

  • alternated the source code of the lambda function to return a flattened response instead of having nested json objects. Also made the response having a smaller (< 4096) fixed size
  • switched to CustomResource and provider framework instead of AwsCustomResource. You can use get_att_string to get the first level of the response (hence the flattening). With AwsCustomResource it is not possible because the first level are the RESPONSE ELEMENTS of the lambda invoke api. This means you can only get the whole Payload field in string format and not the individual fields inside payload.

Note: All these were done because with …

Replies: 9 comments 11 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
7 replies
@manosntoulias
Comment options

@peterwoodworth
Comment options

@manosntoulias
Comment options

@peterwoodworth
Comment options

@manosntoulias
Comment options

Comment options

You must be logged in to vote
3 replies
@peterwoodworth
Comment options

@manosntoulias
Comment options

@peterwoodworth
Comment options

Comment options

You must be logged in to vote
1 reply
@daknhh
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by manosntoulias
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
@aws-cdk/aws-lambda Related to AWS Lambda
7 participants
Converted from issue

This discussion was converted from issue #19831 on April 08, 2022 17:33.