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

Gleb

I have AWS Lambda function and I invoke it calling AWS API Gateway via REST API. For Lambda function I configured two aliases with versioning - QA and Prod.

API Gateway is configured with Lambda Proxy Integration Request. I know about AWS API Gateway stages feature and I create two stages (QA and Prod respectively), but I don't see any settings for Lambda aliases in stage configuration.

How can I specify QA Lambda alias for QA stage and Prod Lambda alias for Prod API stage?

Aaron Williams

On the integration request in API Gateway you can add the alias name to the end of the ARN to make sure your endpoint points to the correct alias. Something like this arn:aws:lambda:region:account-id:function:function-name:alias-name

You can't tell an API Gateway stage to always use a specific Lambda alias and have multiple Gateway stages that all point towards different aliases.

Every time you need to deploy to a Gateway stage, you'll have to make sure your undeployed API Gateway endpoints are configured to point to the correct Lambda alias before deploying to the stage that matches that environment.

This get tricky to maintain, so I would recommend treating your two different stages as completely different resources using the serverless framework or another framework.

Useful resources:

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

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

編集
0

コメントを追加

0

関連記事

分類Dev

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

分類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

AWS API Gateway with AWS WAF

分類Dev

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

分類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

How to create a parent resource in AWS API Gateway?

分類Dev

AWS API Gateway ARN

分類Dev

AWS Api Gateway:

分類Dev

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

分類Dev

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

分類Dev

サーバーレスとAWS:API Gateway Override Stage to Cache Method

分類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

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

分類Dev

How to limit payload size for a specific API Gateway route

分類Dev

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

分類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

AWS Cloudformation Link API Key to API Gateway

分類Dev

How to whilelist specific IP addresses from AWS WAF

分類Dev

AWS Lambda NodeJS Connect to RDS Postgres Database

分類Dev

Nginx proxy_pass to aws Api Gateway

分類Dev

AWS API Gateway + AWSLambdaのCORS

Related 関連記事

  1. 1

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

  2. 2

    Consuming RSS feed with AWS Lambda and API Gateway

  3. 3

    Handling AWS Lambda errors with API Gateway

  4. 4

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

  5. 5

    AWS API Gateway with AWS WAF

  6. 6

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

  7. 7

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

  8. 8

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

  9. 9

    How to create a parent resource in AWS API Gateway?

  10. 10

    AWS API Gateway ARN

  11. 11

    AWS Api Gateway:

  12. 12

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

  13. 13

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

  14. 14

    サーバーレスとAWS:API Gateway Override Stage to Cache Method

  15. 15

    Kafka Connect AWS Lambda Sink

  16. 16

    AWS API Gateway with external authentication

  17. 17

    Configuring logging of AWS API Gateway

  18. 18

    Route subdomain to AWS api gateway

  19. 19

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

  20. 20

    How to limit payload size for a specific API Gateway route

  21. 21

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

  22. 22

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

  23. 23

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

  24. 24

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

  25. 25

    AWS Cloudformation Link API Key to API Gateway

  26. 26

    How to whilelist specific IP addresses from AWS WAF

  27. 27

    AWS Lambda NodeJS Connect to RDS Postgres Database

  28. 28

    Nginx proxy_pass to aws Api Gateway

  29. 29

    AWS API Gateway + AWSLambdaのCORS

ホットタグ

アーカイブ