https://github.com/willabides/eventbridge-pipe
Like eventgrid-pipe but for AWS EventBridge
https://github.com/willabides/eventbridge-pipe
aws eventbridge golang shell
Last synced: 28 days ago
JSON representation
Like eventgrid-pipe but for AWS EventBridge
- Host: GitHub
- URL: https://github.com/willabides/eventbridge-pipe
- Owner: WillAbides
- License: mit
- Created: 2020-12-22T18:25:54.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2020-12-23T19:41:23.000Z (over 4 years ago)
- Last Synced: 2024-04-16T00:25:58.063Z (about 1 year ago)
- Topics: aws, eventbridge, golang, shell
- Language: Go
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# eventbridge-pipe
[](https://github.com/WillAbides/eventbridge-pipe/actions?query=workflow%3Aci+branch%3Amaster+event%3Apush)
## Install
`go get github.com/willabides/eventbridge-pipe/cmd/ebpipe`
## Usage
```
Usage: ebpipe --type=STRING --source=STRINGebpipe posts events to AWS EventBridge.
example:
$ AWS_ACCESS_KEY='AKIA****************'
$ AWS_SECRET_KEY='shhh_this_is_a_secret'
$ data="$(cat <<"EOF"
{"action": "obj.add", "@timestamp": 1604953432032, "el_name": "foo", "doc_id": "asdf"}
{"action": "obj.rem", "@timestamp": 1604953732032, "el_name": "bar", "doc_id": "fdsa"}
EOF
)"
$ echo "$data" | \
ebpipe -s 'test-source' -t 'jp:action' -b 'my-bus' -T 'jp:"@timestamp"' \
-r 'jp:"el_name"'Flags:
-h, --help Show context-sensitive help.
--region="us-east-1" The aws region to publish events to.
-t, --type=STRING Value for the DetailType field. JMESPath expressions allowed
with "jp:" prefix.
-b, --event-bus=STRING Value for the "EventBusName" field.
-r, --resource=RESOURCE,... An element for the list in the "Resources" array. JMESPath
expressions allowed with "jp:" prefix.
-s, --source=STRING Value for the "Source" field. JMESPath expressions allowed with
"jp:" prefix.
-T, --timestamp=STRING Value for the "Time" field converted from epoch milliseconds.
JMESPath expressions allowed with "jp:" prefix.
--batch-size=10 Number of events to send in a batch.
--flush-interval=2000 Time in milliseconds to wait before sending a partial batch.
Set to 0 to never send a partial batch.Learn about JMESPath syntax at https://jmespath.org
```