- Newest
- Most votes
- Most comments
You can use input transformation to transform the text of an event before sending it to a target. This can be done in the console or API.
See this reference guide for how to do so: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-transform-target-input.html
Note that you are taking parts of the matched events or constants and recreating a new text format, usually JSON. Here is a tutorial on how to use input transformers: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-input-transformer-tutorial.html
However, like you said you can also use Lambda where you'll have full control over the transformation process for the desired output. In the Lambda function you can access the event data through the event parameter in your Lambda handler function, transform it to your desired output, and then send the transformed output to an SNS topic. This might be the preferred option if you need a very specific format for your output.
If you need guidance on setting up your function see: https://docs.aws.amazon.com/lambda/latest/dg/python-handler.html
To publish to an SNS topic with a Lambda see this link: https://repost.aws/knowledge-center/sns-topic-lambda
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 4 months ago
