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 - Amazon Web Services (AWS) Tutorial
From the course: AWS for Developers: Data-Driven Serverless Applications with Kinesis (2019)
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Kinesis introduction4m 44s
-
(Locked)
Designing an event-driven application4m 48s
-
(Locked)
Create stream with CloudFormation2m
-
(Locked)
Create an order5m 9s
-
(Locked)
Setting up DynamoDB and saving into the table6m 19s
-
(Locked)
Send a message to the stream using AWS SDK2m 54s
-
(Locked)
Setting up all the permissions4m 44s
-
(Locked)
Deploying and testing5m 1s
-
(Locked)
Challenge: API Gateway and Lambda1m 19s
-
(Locked)
Solution: API Gateway and Lambda10m 31s
-
-
-
-