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?
Configure a stage variable that holds the Lambda alias and reference it in the integration URI.
Create a separate custom domain name for each stage-alias combination.
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 Lambda aliases and how do they work?
Open an interactive chat with Bash
What are stage variables in Amazon API Gateway?
Open an interactive chat with Bash
Why is it important to test different versions of Lambda functions?
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...
IT & Cybersecurity Package Join Premium for Full Access