AWS Certified Developer Associate DVA-C02 Practice Question
A development team manages a critical serverless application using Amazon API Gateway and AWS Lambda. They have a single REST API definition that needs to be deployed across three distinct environments: dev, test, and prod. Each environment requires the API to integrate with a different backend Lambda function (e.g., my-function-dev, my-function-test, and my-function-prod). The team wants to avoid duplicating the entire API definition for each environment and needs a dynamic way to specify the correct Lambda function based on the deployment stage. Which API Gateway feature should the developer use to meet these requirements most efficiently?
Exclusive deployment of separate Lambda functions per environment
Isolation of environments using network ACLs and security groups
Stage variables
Comprehensive resource duplication for each environment
Stage variables are the correct feature for this scenario. They are name-value pairs that can be defined for each deployment stage of a REST API, acting like environment variables. By defining a variable in each stage (e.g., lambdaName) and setting its value to the corresponding function name (my-function-dev, my-function-test), the API integration can dynamically reference this variable (${stageVariables.lambdaName}) to invoke the correct backend Lambda function without changing the core API definition. Comprehensive resource duplication is inefficient and costly. Network ACLs and security groups provide network-level isolation, but do not help configure the API's backend integration. Exclusively deploying functions per environment is part of the solution, but it is the stage variables that allow API Gateway to dynamically route to them.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What are stage variables in AWS API Gateway?
Open an interactive chat with Bash
How do stage variables differ from duplicating API resources for each environment?
Open an interactive chat with Bash
When should you use stage variables instead of services like AWS AppConfig?
Open an interactive chat with Bash
AWS Certified Developer Associate DVA-C02
Deployment
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .