Invalid InputTemplate for target

0

I´m trying to test this

https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-sandbox-input-trans.html

Input path:

{
  "requester": "$.detail.requester",
  "key": "$.detail.object.key",
  "bucket": "$.detail.bucket.name"
}

Input template:

{
    "<requester> has created the object \"<key>\" in the bucket \"<bucket>\"",
    "RuleName": <aws.events.rule-name>,
    "ruleArn" : <aws.events.rule-arn>,
    "Transformed": "Yes"
}

but I´m getting this error message: Invalid InputTemplate for target Id1723290b-5086-4e82-ab16-5605fd17fb0e : [Source: (String)"{ "null has created the object "null" in the bucket "null"", "RuleName": null, "ruleArn" : null, "Transformed": "Yes" }"; line: 2, column: 67].

Any ideas why? thanks a lot

profile pictureAWS
gefragt vor 4 Monaten198 Aufrufe
1 Antwort
0
Akzeptierte Antwort

Hello.

I was able to confirm in my environment that the input template etc. worked with the settings as described in the document.
Maybe something went wrong when copy-pasting.
Try typing it manually instead of copy-pasting.
Also, be sure to select "S3 Object Created" for the sample event.

profile picture
EXPERTE
beantwortet vor 4 Monaten
  • Don´t know why this input template hasn´t worked for me, had to add a ":" and string at the end of 1st line.

    Something like this:

    { "<requester> has created the object "<key>" in the bucket "<bucket>"": "string", "RuleName": <aws.events.rule-name>, "ruleArn" : <aws.events.rule-arn>, "Transformed": "Yes" }

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