Skip to main content

AWS DVA-C02 Drill: API Gateway & Lambda Aliases - Stage vs. Integration Configuration

Jeff Taakey
Author
Jeff Taakey
21+ Year Enterprise Architect | AWS SAA/SAP & Multi-Cloud Expert.

Jeff’s Note
#

Unlike generic exam dumps, ADH analyzes this scenario through the lens of a Real-World Lead Developer.

For AWS DVA-C02 candidates, the confusion often lies in how API Gateway handles stage variables vs. integration request settings when routing to Lambda aliases. In production-grade apps, this is about knowing exactly where you configure stage variables and how to deploy multiple stages to point Lambda invocations correctly. Let’s drill down.

The Certification Drill (Simulated Question)
#

Scenario
#

TechLink Innovations has developed a weather data ingestion API using Amazon API Gateway REST APIs integrated with AWS Lambda functions. The API’s current dev stage routes requests to a Lambda function’s dev alias. The development team needs to make a production stage available that uses the Lambda function’s prod alias without disrupting the existing development stage.

The Requirement:
#

Implement a solution that enables the API Gateway to serve requests against the Lambda function’s prod alias through a dedicated production stage, maintaining separation from the development environment.

The Options
#

  • A) Create a new method called production on the existing API and configure the method to include a stage variable that points to the Lambda function’s prod alias.
  • B) Create a new method called production on the existing API and configure the integration request on the API’s development stage to point to the Lambda function’s prod alias.
  • C) Deploy the API to a new stage named production and configure that stage to include a stage variable referencing the Lambda function’s prod alias.
  • D) Deploy the API to a new stage named production and configure the integration request on the production stage to point directly to the Lambda function’s prod alias.

Google adsense
#

leave a comment:

Correct Answer
#

C

Quick Insight: The Developer Imperative
#

When working with API Gateway, stages are the natural constructs to represent environment aliases (like dev and prod). Stage variables provide a powerful way to dynamically direct integrations, such as Lambda function aliases, without changing the API structure or methods.

While integration requests can be set per method, managing environments via separate stages with stage variables is the best practice to promote separation of concerns and ease deployment workflows.

Content Locked: The Expert Analysis
#

You’ve identified the answer. But do you know the implementation details that separate a Junior from a Senior?


The Expert’s Analysis
#

Correct Answer
#

Option C

The Winning Logic
#

Deploying the API to a new stage named production and configuring a stage variable that points to the Lambda function’s prod alias best aligns with API Gateway’s environment management model. Using a stage variable here allows the same API methods to dynamically reference different Lambda aliases depending on the deployment stage.

  • The dev stage references the dev alias via stage variables.
  • The production stage references the prod alias similarly.

This enables clean separation of environments without changing API methods or duplicating logic, fitting well with CI/CD pipelines and environment segregation.

The Trap (Distractor Analysis):
#

  • Why not A?
    Creating a new method named production is not a normal REST API practice—HTTP methods correspond to verbs like GET or POST, not environment names. Also, environment differentiation should be handled at the stage level, not by method names.

  • Why not B?
    Configuring the integration request on the development stage to point to the prod alias mixes environments. The dev stage should keep its integration pointing to the dev alias to avoid accidentally invoking production code.

  • Why not D?
    While deploying a new production stage is correct, configuring the integration request explicitly for the production stage (instead of relying on stage variables) complicates management and is less flexible, especially if the API methods change. Stage variables abstract this better.


The Technical Blueprint
#

# Example of deploying the API with stage variable for Lambda alias

aws apigateway create-deployment \
  --rest-api-id abcdef1234 \
  --stage-name production \
  --stage-variables lambdaAlias=prod

In API Gateway integration request, reference the Lambda function ARN with stage variable:

arn:aws:lambda:region:account-id:function:function-name:${stageVariables.lambdaAlias}

The Comparative Analysis
#

Option API Complexity Deployment Flexibility Use Case
A High - unconventional method name Low - environment tied to method, not stage Not recommended
B Medium - modifies dev stage integration Low - mixes dev and prod in one stage Incorrect environment isolation
C Low - uses standard stage variables High - clean environment separation per stage Best practice for prod/dev isolation
D Medium - manual integration override per stage Medium - more manual work, less dynamic Allowed but less flexible

Real-World Application (Practitioner Insight)
#

Exam Rule
#

“For the exam, always pick deploying to separate API Gateway stages with stage variables when you see different Lambda aliases for environment management.”

Real World
#

“In real projects, using separate stages (dev, test, prod) with stage variables pointing to respective Lambda aliases streamlines CI/CD deployments and rollback strategies, minimizing risks.”


(CTA) Stop Guessing, Start Mastering
#


Disclaimer

This is a study note based on simulated scenarios for the AWS DVA-C02 exam.

The DevPro Network: Mission and Founder

A 21-Year Tech Leadership Journey

Jeff Taakey has driven complex systems for over two decades, serving in pivotal roles as an Architect, Technical Director, and startup Co-founder/CTO.

He holds both an MBA degree and a Computer Science Master's degree from an English-speaking university in Hong Kong. His expertise is further backed by multiple international certifications including TOGAF, PMP, ITIL, and AWS SAA.

His experience spans diverse sectors and includes leading large, multidisciplinary teams (up to 86 people). He has also served as a Development Team Lead while cooperating with global teams spanning North America, Europe, and Asia-Pacific. He has spearheaded the design of an industry cloud platform. This work was often conducted within global Fortune 500 environments like IBM, Citi and Panasonic.

Following a recent Master’s degree from an English-speaking university in Hong Kong, he launched this platform to share advanced, practical technical knowledge with the global developer community.


About This Site: AWS.CertDevPro.com


AWS.CertDevPro.com focuses exclusively on mastering the Amazon Web Services ecosystem. We transform raw practice questions into strategic Decision Matrices. Led by Jeff Taakey (MBA & 21-year veteran of IBM/Citi), we provide the exclusive SAA and SAP Master Packs designed to move your cloud expertise from certification-ready to project-ready.