-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
(cdk.aws_events): Unable to send XML (application/xml) via API Destinations #30704
Comments
@dobeerman Good afternoon. Could you please share the following:
Per RuleTargetInput.fromEventPath takes the event target input from a path in the event JSON, which would be an escaped string. So I'm unsure if this is a CDK issue. Thanks, |
Hi @ashishdhingra Thank you for the swift reply. Target settings:
API Destination: |
@dobeerman Apologies for late response. Please let us know if you are able to get workaround this issue. As mentioned in my previous comment, per RuleTargetInput.fromEventPath takes the event target input from a path in the event JSON, which would be an escaped string. Thanks, |
Hey @ashishdhingra, Unfortunately, I couldn't find a workaround, so I had to write a Lambda function instead. And I know, this is not an issue of CDK, and CloudFormation itself. cheers, |
Comments on closed issues and PRs are hard for our team to see. |
Describe the bug
Our server is configured to accept only XML messages. In our application, we send an object where one of the attributes contains an XML message. However, when using AWS EventBridge API Destinations, the XML message is being wrapped in double quotes, leading to incorrect formatting that the server cannot parse correctly.
Below the transformation we use:
Expected Behavior
application/xml
.Current Behavior
Reproduction Steps
Configure an EventBridge rule to send an event with an XML payload in one of its attributes.
Use the current transformation method to target an API Destination.
Observe that the server receives the XML payload wrapped in double quotes.
Possible Solution
Investigate a method to transform and send the XML content as raw XML without any additional wrapping or formatting. Ensure that the content-type and accept headers are correctly set for XML.
Additional Information/Context
This issue prevents the server from correctly processing XML messages, which can lead to failed requests and disrupted workflows.
CDK CLI Version
2.147.2
Framework Version
No response
Node.js Version
v20.10.0
OS
*nix
Language
TypeScript
Language Version
5.4.5
Other information
No response
The text was updated successfully, but these errors were encountered: