From the course: AWS for Developers: Data-Driven Serverless Applications with Kinesis (2019)

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Solution: API Gateway and Lambda

Solution: API Gateway and Lambda - Amazon Web Services (AWS) Tutorial

From the course: AWS for Developers: Data-Driven Serverless Applications with Kinesis (2019)

Start my 1-month free trial

Solution: API Gateway and Lambda

(upbeat techno music) - [Instructor] So in the challenge I ask you to create a new API Gateway Lambda that will trigger when a cake producer completes an order. And this Lambda should update the order metadata in the table and also send a message to the stream that the order was fulfilled. So let's see how I solve this problem. The first thing I want to do is to go to the serverless.yml and create the function. So we are going in the function's definition under the other function that we can have there to create order and we are going to create a new order that I will call orderFulfillment. There we need to give a path for the code that will be in our handler in the method orderFulfillment and this Lambda will get triggered with an http event. So we write that and in the path order/fulfill. And in the method, post. So that was in the description of the challenge. So now we can go to the handler.js and create this new method. So we can go under the definition of the method that we have…

Contents