Closed dobeerman closed 3 weeks ago
@dobeerman Good afternoon. Could you please share the following:
cdk synth
command (basically generated CloudFormation template)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, Ashish
Hi @ashishdhingra Thank you for the swift reply.
Target settings:
Input to target: Part of the matched event "$.detail.xml"
Additional parameters: PathParameterValues: ["$.detail.teamId","$.detail.userId","$.detail.orderId"]
HeaderParameters:
accept: application/xml
content-type: application/xml
Dead-letter queue (DLQ): -
Retry policy:
24h
Retry attempts: 3
API Destination: Active / Authorized
@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, Ashish
Please let us know if you are able to get workaround this issue.
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, alex
Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one.
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