AWS Certified Developer Associate DVA-C02 Practice Question
A development team has created a REST API in Amazon API Gateway with two stages: dev and prod. Both stages invoke the same AWS Lambda function. The team wants calls to the dev stage to invoke the dev alias of the function and calls to the prod stage to invoke the prod alias-without editing the API's integration settings whenever the API is promoted between stages.
Which API Gateway feature enables this behavior?
Create a separate custom domain name for each stage-alias combination.
Configure a stage variable that holds the Lambda alias and reference it in the integration URI.
Enable a canary deployment for the stage and route all traffic to the desired alias.
Attach a usage plan that maps requests from each stage to a different Lambda alias.
Stage variables store key-value pairs that are resolved when a stage is invoked. By saving the Lambda alias (for example, myFunction:dev or myFunction:prod) in a stage variable and inserting that variable in the Lambda integration URI (such as arn:aws:apigateway:region:lambda:path/…:$/invocations), each stage automatically invokes the correct alias. Canary settings control traffic splitting, usage plans regulate throttling and quotas, and custom domain names map hostnames-they do not change the Lambda alias that a stage calls.
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 Lambda aliases work with API Gateway integrations?
Open an interactive chat with Bash
Why are canary deployments unsuitable for alias switching in this scenario?
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 .