boyney123 / eventbridge-transformer Goto Github PK
View Code? Open in Web Editor NEWOnline tool to quickly build input templates and paths for Amazon EventBridge
Home Page: https://eventbridge-transformer.vercel.app
License: MIT License
Online tool to quickly build input templates and paths for Amazon EventBridge
Home Page: https://eventbridge-transformer.vercel.app
License: MIT License
At the moment it only supports JSON, but would be good to have a dropdown/switch to also support string templates, and any other templates we can think of.
Hi, I recently used your tool to generate an input transformer (great tool btw). However I had trouble because the index for items in an array is wrapped in '.' as opposed to '[]'. For example, take the following event - with a 'findings' array:
{
"version": "0",
"id": "8e5622f9-d81c-4d81-612a-9319e7ee2506",
"detail-type": "Security Hub Findings - Imported",
"source": "aws.securityhub",
"account": "123456789012",
"time": "2019-04-11T21:52:17Z",
"region": "us-west-2",
"detail": {
"findings": [
{
"SchemaVersion": "2018-10-08",
"CompanyName": "AWS",
"FirstObservedAt": "2022-08-10T10:36:01.841Z",
"LastObservedAt": "2022-10-20T23:33:15.790Z",
"CreatedAt": "2022-08-10T10:36:01.841Z",
"UpdatedAt": "2022-10-20T23:33:13.854Z",
"Severity": {
"Product": 40,
"Label": "MEDIUM",
"Normalized": 40,
"Original": "MEDIUM"
}
}
]
}
}
The Input Path specified for the 'SchemaVersion' is specified as:
{
"SchemaVersion": "$.detail.findings.0.SchemaVersion"
}
However, while this works in the AWS console - and produces the desired output, the output was missing from the content received via email from the SNS topic. AWS support pointed me to their documentation, which highlighted that the index should be referenced with square brackets:
{
"SchemaVersion": "$.detail.findings[0].SchemaVersion"
}
This is also defined in the JSONPath README:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.