Is Direct Integration API Gateway to DDB Still Supported?


My website has a very slow-performing DynamoDB query on its front page that I was hoping to improve using a direct integration strategy from API Gateway. Several AWS documents including 'Using Amazon API Gateway as a proxy for DynamoDB' suggests that it is possible -- but they and all the stackoverflow threads about the subject are years old and some of the UI features and options mentioned are no longer available. For example: 'AWS Service Proxy' is not an integration option on API Gateway

API Gateway no longer provides 'Add Resource' or any of the Resource/Integration Request model described in this post. The only integrations available for a Route are

  • Lambda Function
  • Private Resource
  • Event Bridge
  • Simple Queue
  • App Config
  • Kinesis
  • Step Function Where are these integration types?

Is this kind of direct integration still supported at all?
Is it possible to pass through a DynamoDB get_item request direct from API Gatway and skip the lambda function entirely, assuming my client can handle the return data?
Where is the mapping between the incoming GET request and the 'get_item' -- this must be some part of the DevOps config but I can't figure out where.

Thank you, +Scott Gross

3 Risposte
Risposta accettata

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.

profile pictureAWS
con risposta 2 mesi fa

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:

profile picture
con risposta 2 mesi fa
  • 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).


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 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!

profile picture
con risposta 2 mesi fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande