How to properly connect AWS API gateway -> Lambda -> DAX -> DynamoDB?

pjb

I had everything working very nicely with a CloudFormation template that created an API Gateway with proxy integrations to Lambda functions, which in turn manipulated various DynamoDB tables.

Lately, though, I've started to experience the shortcomings of DynamoDB and it's read/write workers. So, I thought, I will enable DynamoDB DAX to speed things up with its caching.

I had no problems getting the CloudFormation template setup to build the DAX cluster.

But when I tried to connect to DAX from Lambda functions I get errors such as NoRouteException: not able to resolve address. Searching around, it turns out that since DAX is in a VPC, Lambda functions of course cannot access. The Lambda functions must also be in the VPC.

But if I put the Lambda functions in the VPC, then API Gateway cannot presumably access the Lambda functions via proxy integration.

So, how to orchestrate API Gateway -> Lambda -> DAX within the VPC?

It seems loopy that DAX cannot easily be used by the common API Gateway -> Lambda pattern. The VPC requirement is a real killer, and it really means that DAX is mostly only useful for EC2 instances, vs API -> Lambda.

Any ideas?

Michael - sqlbot

But if I put the Lambda functions in the VPC, then API Gateway cannot presumably access the Lambda functions via proxy integration.

That isn't correct. API Gateway accesses Lambda functions by invoking them using the Lambda service API, proxy or not, VPC or not.

API Gateway doesn't connect directly to the Lambda function container -- so the container placement (inside or outside VPC) doesn't impact API Gateway's ability to actually invoke the function -- it impacts what the function can access but not how it can be accessed.

Proxy integration modifies the behavior and handling of the payload, but not the way API Gateway actually connects to the Lambda service to invoke the function and receive the response.

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

How to connect specific AWS API Gateway stage to specific AWS lambda alias

分類Dev

AWS DynamoDB DAX "NoRouteException"

分類Dev

Consuming RSS feed with AWS Lambda and API Gateway

分類Dev

Handling AWS Lambda errors with API Gateway

分類Dev

How to pass data from AWS API Gateway Custom Authorizer to an AWS Lambda function?

分類Dev

How to add CORS header to AWS API Gateway response with lambda proxy integration activate

分類Dev

How do I determine the path or action for my Lambda when setting up AWS API Gateway through the CLI?

分類Dev

AWS API Gateway - Lambda Proxy not turning on via CloudFormation template

分類Dev

How to create a parent resource in AWS API Gateway?

分類Dev

Connect Android App to AWS dynamoDB

分類Dev

How to apply Security Policy on AWS API Gateway using AWS CloudFormation?

分類Dev

Best practice to create a CI pipeline for AWS Cognito + API Gateway + Lambdas + DynamoDB + SNS

分類Dev

AWS API Gateway ARN

分類Dev

AWS Api Gateway:

分類Dev

AWS API Gateway with AWS WAF

分類Dev

API Gateway、Lambda、Cognito、S3、Dynamodbを使用したAWSグローバルインフラストラクチャのデプロイ

分類Dev

How do you point API Gateway to a lambda Alias in CDK?

分類Dev

Will AWS DAX of Dynamodb cache null result when GetItem result is null?

分類Dev

How to use AWS API Gateway to strip parameters from URL?

分類Dev

AWS API Gateway Lambda Error Regexのドキュメント?

分類Dev

AWS API Gateway + Cognito + Lambda- $ context.authorizer.principalId empty

分類Dev

AWS Lambda w / API Gateway for Angularバックエンド?

分類Dev

Kafka Connect AWS Lambda Sink

分類Dev

AWS API Gateway with external authentication

分類Dev

Configuring logging of AWS API Gateway

分類Dev

Route subdomain to AWS api gateway

分類Dev

AWS DynamoDB on Lambda not returning inserted data

分類Dev

AWS Api GatewayとLambdaの「AWS / ApiGateway 5XXError」をデバッグする方法

分類Dev

AWS Cloudformation Link API Key to API Gateway

Related 関連記事

  1. 1

    How to connect specific AWS API Gateway stage to specific AWS lambda alias

  2. 2

    AWS DynamoDB DAX "NoRouteException"

  3. 3

    Consuming RSS feed with AWS Lambda and API Gateway

  4. 4

    Handling AWS Lambda errors with API Gateway

  5. 5

    How to pass data from AWS API Gateway Custom Authorizer to an AWS Lambda function?

  6. 6

    How to add CORS header to AWS API Gateway response with lambda proxy integration activate

  7. 7

    How do I determine the path or action for my Lambda when setting up AWS API Gateway through the CLI?

  8. 8

    AWS API Gateway - Lambda Proxy not turning on via CloudFormation template

  9. 9

    How to create a parent resource in AWS API Gateway?

  10. 10

    Connect Android App to AWS dynamoDB

  11. 11

    How to apply Security Policy on AWS API Gateway using AWS CloudFormation?

  12. 12

    Best practice to create a CI pipeline for AWS Cognito + API Gateway + Lambdas + DynamoDB + SNS

  13. 13

    AWS API Gateway ARN

  14. 14

    AWS Api Gateway:

  15. 15

    AWS API Gateway with AWS WAF

  16. 16

    API Gateway、Lambda、Cognito、S3、Dynamodbを使用したAWSグローバルインフラストラクチャのデプロイ

  17. 17

    How do you point API Gateway to a lambda Alias in CDK?

  18. 18

    Will AWS DAX of Dynamodb cache null result when GetItem result is null?

  19. 19

    How to use AWS API Gateway to strip parameters from URL?

  20. 20

    AWS API Gateway Lambda Error Regexのドキュメント?

  21. 21

    AWS API Gateway + Cognito + Lambda- $ context.authorizer.principalId empty

  22. 22

    AWS Lambda w / API Gateway for Angularバックエンド?

  23. 23

    Kafka Connect AWS Lambda Sink

  24. 24

    AWS API Gateway with external authentication

  25. 25

    Configuring logging of AWS API Gateway

  26. 26

    Route subdomain to AWS api gateway

  27. 27

    AWS DynamoDB on Lambda not returning inserted data

  28. 28

    AWS Api GatewayとLambdaの「AWS / ApiGateway 5XXError」をデバッグする方法

  29. 29

    AWS Cloudformation Link API Key to API Gateway

ホットタグ

アーカイブ