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 Antworten
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
beantwortet vor 6 Monaten
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

beantwortet vor 6 Monaten
  • 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.

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen