课程: AWS for Developers: Data-Driven Serverless Applications with Kinesis

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

Trigger a Lambda function

Trigger a Lambda function

- [Instructor] Now that you've learned about event source mapping, let's create one and trigger the Lambda function you created previously when there is a new record in the stream you already have. So basically, we are connecting the function to the source. For doing that is very simple. Let's set an event to this function. So here, we need to add a new property called Events, and then put a name to that event, in this case, I will just name it KinesisEvent, but it can be named anything. Then, we are going to give a type and some properties to that event. Which stream is going to trigger this event? This is the Source.Arn, Amazon Resource Name, and it's coming from this resource. So you can see that this connection is a dynamic connection. Whenever we deploy the ARN for the source will change, and this is just going to grab it. The starting position, TRIM_HORIZON, and the batch size is 1, so we are going to get one record…

内容