Blueprints

Send custom events from your application to AWS EventBridge

Source

yaml
id: aws-event-bridge
namespace: company.team

tasks:
  - id: send_events
    type: io.kestra.plugin.aws.eventbridge.PutEvents
    entries:
      - source: kestra
        eventBusName: default
        detailType: my-custom-app
        detail:
          message: this could be any event - a user sign-in event or a payment
      - source: kestra
        eventBusName: default
        detailType: my-custom-app
        detail:
          message: this could also be any event - an IoT device event or a sensor reading
      - source: kestra
        eventBusName: default
        detailType: my-custom-app
        detail:
          message: another event which could be a user sign-out event or a newsletter
            subscription

  - id: extract_json
    type: io.kestra.plugin.core.http.Download
    uri: https://huggingface.co/datasets/kestra/datasets/raw/main/json/app_events.json

  - id: json_to_ion
    type: io.kestra.plugin.serdes.json.JsonToIon
    from: "{{ outputs.extract_json.uri }}"
    newLine: false

  - id: send_events_json
    type: io.kestra.plugin.aws.eventbridge.PutEvents
    entries: "{{ outputs.json_to_ion.uri }}"

About this blueprint

AWS API

This flow will send one or more events to the specified event bus on AWS EventBridge. The events can be sent as a JSON file or as a list of maps (dictionaries). For simple use cases, the map syntax is the easiest to get started. However, if your application already emits events in the same format as required by the AWS CLI and API, you can extract JSON data in one task and pass it to the AWS EventBridge PutEvents task — just make sure to convert JSON file to the ION format, as this is a format expected by the task to allow row-by-row processing.

Put Events

Download

Json To Ion

More Related Blueprints

New to Kestra?

Use blueprints to kickstart your first workflows.

Get started with Kestra