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.

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ