Changes to FaunaDB Documents to AWS Lambda
@dylburger
code:
data:privatelast updated:3 years ago
@dylburger/
Changes to FaunaDB Documents to AWS Lambda
  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 and attach an IAM policy of the following format:
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": "lambda:InvokeFunction",
            "Resource": "[your-lambda-arn]"
        }
    ]
}

This assumes you have an existing Lambda you'd like to invoke. If not, go ahead an create one now.

  1. Click the Connect Account button in invoke_lambda step, saving your AWS access and secret keys from Step 2 above.
  2. Add the name of your Lambda function as the value of the Lambda Function Name parameter.
  3. Make sure your event source is turned On, then Deploy the workflow.