Pass the message from event bus to ECS task using Event Rule

0

I am trying with the Input parameter in the CFT. But its saying its not a

Resource handler returned message: "JSON syntax error in input for target

This is my event Pattern which is able to trigger the ECS task when I send someting starting with "trig". Samething I want to print in the file.

{ "detail": { "messageAttributes": { "operation": { "stringValue": [{ "prefix": "trig" }] } } } }

I am using input parameter

"Input": "$.detail.messageAttributes.operation.stringValue"

It would be great if you could help me with this

2 回答
1

Take a look at your template and validate the syntax. Here is a article that walks through several examples. In your case, take a look under Confirm that Conditions is specified as a string in CFT Template Validation

AWS
AWS-SD
已回答 6 个月前
0

You are passing a collection of map types. However, that is not a valid type for cloud formation parameter values. String value is going to need to be comma separated list of strings, if I understand what you are trying to do.

See here: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html

已回答 6 个月前
  • My doubt was how to pass the message using event rule, when source is SQS and target is an ECS task. In event rule, there are three fields Input, InputPath, InputTransformer but I am not sure how to use any of these I didn't find any example in documentation. According to defintion I implemented Input parameter in CFT "Input": "$.detail.messageAttributes.operation.stringValue" to get this particular value from the event received in event bus.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则

相关内容