From the course: AWS API Gateway with HTTP, Lambda, DynamoDB, and iOS

Unlock the full course today

Join today to access over 24,500 courses taught by industry experts.

Test POST to table

Test POST to table

- [Instructor] I want to test this Lambda and I want to test it with a POST so I can create a new value in my DynamoDB table. So I need to pass in some information, right? I need to pass in that it's a POST. I need to pass in what data I want to store. And I can do that right from the Lambda console. I can set up a test to do that, make sure it works before I even set up the API. So I'm going to go back to my Lambda console and set up this test and then I can verify to make sure that I've updated the database table. So here I am in the Lambda and I'm going to create a test. I need to make sure that what gets passed in, the event, has an HTTP method. I want it to be a POST. And then, it also needs a body of what I want to store in the database table. So up here towards the top of the code, I have this Test button and I'm going to configure a test. I'm going to create a new event. I'm going to give it a name of POSTTest. And down here, I'm not going to worry about the template. I'm…

Contents