You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary: AWS SDK returns API response body as a buffer that requires special handling. Without it, it's unusable as flatten function decomposes into a group of fields such as Body.0, Body.1, Body.2 etc, byte by byte.
At the very least, I expected Data object to have a key Body with content being a raw string.
Ideally, it'd be nice if we could attempt JSON-decode it in case response content type is application/json.
What actually happened?
Please see example above where response body is decomposed into a set of fields such as Body.0, Body.1, Body.2 etc, byte by byte.
…able (#9977)
Convert buffers to strings when flattening the API response.
Closes#9969, closes#10017
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Summary: AWS SDK returns API response body as a buffer that requires special handling. Without it, it's unusable as flatten function decomposes into a group of fields such as
Body.0
,Body.1
,Body.2
etc, byte by byte.Reproduction Steps
Example in Java:
CloudWatch logs show following:
What did you expect to happen?
At the very least, I expected
Data
object to have a keyBody
with content being a raw string.Ideally, it'd be nice if we could attempt JSON-decode it in case response content type is
application/json
.What actually happened?
Please see example above where response body is decomposed into a set of fields such as
Body.0
,Body.1
,Body.2
etc, byte by byte.Environment
Other
While I'm not using the latest version of CDK, the latest source code indicates that the issues is still present: https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/custom-resources/lib/aws-custom-resource/runtime/index.ts#L118-L122
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: