From ab1da04d8469402e8ebfd2d535f25fdd14dc2a29 Mon Sep 17 00:00:00 2001 From: Philipp Muens Date: Thu, 4 Aug 2016 15:34:06 +0200 Subject: [PATCH] Incorporate Pull Request feedback --- docs/guide/overview-of-event-sources.md | 51 ++++++++++++++++++++++--- 1 file changed, 45 insertions(+), 6 deletions(-) diff --git a/docs/guide/overview-of-event-sources.md b/docs/guide/overview-of-event-sources.md index 507e9754e..73241d0e7 100644 --- a/docs/guide/overview-of-event-sources.md +++ b/docs/guide/overview-of-event-sources.md @@ -7,6 +7,13 @@ Just open up an [issue](https://github.com/serverless/serverless/issues) if you The examples will show you how you can use the different event definitions. +- [S3](#s3) +- [Schedule](#schedule) +- [HTTP endpoint](#http-endpoint) +- [SNS](#sns) +- [Kinesis Streams](#kinesis-streams) +- [DynamoDB Streams](#dynamodb-streams) + ## Amazon Web Services (AWS) ### S3 @@ -143,12 +150,44 @@ functions: ### Kinesis Streams -We [need your feedback](https://github.com/serverless/serverless/issues/1608) for the exact implementation. In the -meantime you should take a look at the [plugin README](/lib/plugins/aws/deploy/compile/events/kinesis) to see how you -can easily setup this feature by hand. +Currently there's no native support for Kinesis Streams ([we need your feedback](https://github.com/serverless/serverless/issues/1608)) +but you can use custom provider resources to setup the mapping: + +```yml +# serverless.yml + +resources + Resources: + mapping: + Type: AWS::Lambda::EventSourceMapping + Properties: + BatchSize: 10 + EventSourceArn: "arn:aws:kinesis:::stream/" + FunctionName: + Fn::GetAtt: + - "" + - "Arn" + StartingPosition: "TRIM_HORIZON" +``` ### DynamoDB Streams -We [need your feedback](https://github.com/serverless/serverless/issues/1441) for the exact implementation. In the -meantime you should take a look at the [plugin README](/lib/plugins/aws/deploy/compile/events/dynamodb) to see how you -can easily setup this feature by hand. +Currently there's no native support for DynamoDB Streams ([we need your feedback](https://github.com/serverless/serverless/issues/1441)) +but you can use custom provider resources to setup the mapping: + +```yml +# serverless.yml + +resources + Resources: + mapping: + Type: AWS::Lambda::EventSourceMapping + Properties: + BatchSize: 10 + EventSourceArn: "arn:aws:dynamodb:::table//stream/" + FunctionName: + Fn::GetAtt: + - "" + - "Arn" + StartingPosition: "TRIM_HORIZON" +```