Mapping requests

The expected request structure for our Lambda, based on the request POJO, is as follows:

{
"name" : "Heartin",
"time" : "Morning"
}

The request payload sent from the client via the POST request is as follows:

{
"user" : {
"name" : "Heartin"
},
"greeting" : {
"time" : "Morning"
}
}

We can map the request payload to the expected JSON format by using the following mapping template:

{
"name" : $input.json('$.user.name'),
"time" : $input.json('$.greeting.time')
}
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.71.211