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 Risposte
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
con risposta 6 mesi fa
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

con risposta 6 mesi fa
  • 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.

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande