Changes to FaunaDB Documents to AWS EventBridge Event Bus
@dylburger
code:
data:privatelast updated:3 years ago
@dylburger/
Changes to FaunaDB Documents to AWS EventBridge Event Bus

AWS EventBridge allows you to route events from AWS services to other AWS services using declarative rules. For example, every time you launch an EC2 instance, EventBridge can trigger a Lambda function.

You can also send your own events to EventBridge, using the PutEvents Action. This allows you to route any events from any SaaS app to your AWS account so you can process them further.

This workflow shows you a trivial example of how this works: it runs every time a new item appears in an RSS feed, sending that to an EventBridge event bus you create in your AWS account. Then, you can create rules that route those events to your target service.

Usage

  1. Copy this workflow and select the event source tied to your FaunaDB changes feed. This will run the workflow every time a document is added or removed in that collection.
  2. Create an IAM user with permissions to PutEvents to EventBridge:
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": "events:PutEvents",
            "Resource": "*"
        }
    ]
}
  1. Press the Connect Account button in the EventBridge step of the workflow, just below the RSS trigger. This will ask for the access and secret key of the user you created in Step 2.
  2. Make sure your event source is turned On, then Deploy the workflow.