Relative Content

Tag Archive for amazon-web-servicesamazon-dynamodbaws-api-gatewayvtl

How to validate query parameters passed to AWS API gateway?

I have an API deployed to REST API gateway.
My endpoint is https://<gateway-id>.execute-api.<region>.amazonaws.com/<stage>/items?pageSize=10. This endpoint is integrated directly to DynamoDB using the Integration. I want to set a limit to the maximum value that can be passed as the query parameter, eg. 100. Any value beyond 100 should return a 400 – Bad request.
How to do this without having to use any other integration?

How to get recent entries from Dynamo DB

We have a table in Dynamo DB, attributes to be saved are as below.
“ProcessId”(kept this as partition key, unique for each entry), “CreatedDate”(time of insertion), “Filename”, other random attributes….