QuestionQ45

VerifiedDeployment

A company is using Amazon API Gateway to invoke a new AWS Lambda function. The company has Lambda function versions in its PROD and DEV environments. In each environment, there is a Lambda function alias pointing to the corresponding Lambda function version. API Gateway has one stage that is configured to point at the PROD alias.

The company wants to configure API Gateway to enable the PROD and DEV Lambda function versions to be simultaneously and distinctly available.

Which solution will meet these requirements?

Explanation

API Gateway stage variables enable different values per stage, including Lambda alias references. Creating separate stages (PROD and DEV) with stage variables pointing to corresponding aliases allows simultaneous distinct routing. Lambda authorizers (A) handle authorization, not routing; gateway responses (B) handle errors; environment variables (C) are not the correct API Gateway construct for this purpose.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!