- Newest
- Most votes
- Most comments
There ae two types of APIs in API Gateway: REST APIs and HTTP API. HTTP API never supported direct integration with DynamoDB. REST API does support it. You can see the AWS
integration type here. If you use REST API, you will see that the docs you pointed to, make sense now.
To follow-up -- I was successful in converting some of my APIGateway -> Lambda -> DynamoDB routes to Direct Integrations between API Gateway and DynamoDB. The results have dramatically improved load times. The approach could be widely widely applicable for other developers. Here's how I did it:
How to Optimize your Serverless App with API Gateway Direct Integration: http://scottgross.works/papers/direct
YES -- thank you. The GUI has changed, some of the options are difficult to find and it actually took an entire day to follow your instructions successfully. The results are up at theleedz.com and much faster. I should write my own whitepaper on how to do it. In the meantime, here are some links that can help everyone else struggling with this topic. Good luck!
https://aws.amazon.com/blogs/compute/using-amazon-api-gateway-as-a-proxy-for-dynamodb/
Relevant content
- asked 3 years ago
- asked 3 years ago
- asked 3 years ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
Good summary of what you did. I want to emphasize that you should not use Lambda functions just to move data from one place to the other, if you have a direct integration available. So now you are following the best practices.
Saying that, in your Lambda function you initialized the DDB client and the table inside the handler, which means you do it in each invocation. Instead, you should do those type of initializations outside the handler. First, you get a CPU boost during the init, and second, you initialize the clients only in the first invocation. If you make these changes, I am sure that your latency with a Lambda function will be better that what you had (but not better than direct integration).