gradle-aws-plugin icon indicating copy to clipboard operation
gradle-aws-plugin copied to clipboard

How to add a trigger to a Lambda?

Open blundell opened this issue 5 years ago • 0 comments
trafficstars

Looking how to add a DynamoDB trigger to the lambda (or any trigger).

As in how to programatically do this:

Screenshot 2019-12-07 at 9 22 27 pm

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

blundell avatar Dec 07 '19 21:12 blundell