gradle-aws-plugin
gradle-aws-plugin copied to clipboard
How to add a trigger to a Lambda?
trafficstars
Looking how to add a DynamoDB trigger to the lambda (or any trigger).
As in how to programatically do this:

Someone else asking: #163
Related request: https://github.com/classmethod/gradle-aws-plugin/issues/72
This is how you would do it with the AWS CLI:
aws lambda create-event-source-mapping \
--function-name my-function \
--batch-size 500 \
--starting-position LATEST \
--event-source-arn arn:aws:dynamodb:us-east-2:123456789012:table/my-table/stream/2019-06-10T19:26:16.525
Related:
https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html
https://docs.aws.amazon.com/lambda/latest/dg/lambda-services.html