A developer updated a Lambda function used by an API Gateway backend for a web app and needs to test the updated function without affecting production users. Which approach is the MOST operationally efficient way to test the updated Lambda without impacting production traffic?
Choose an answer
Tap an option to check your answer.
Correct answer: Create a new test stage in API Gateway and use stage variables so the updated Lambda is deployed only to that test stage; test using the test stage URL..
Why this is the answer
Creating a new test stage in API Gateway and using stage variables is the most operationally efficient approach. This allows you to deploy the updated Lambda version specifically to the test stage without affecting the production stage. Stage variables can be used to point the test stage to the new Lambda function ARN, while the production stage continues to use the existing, stable Lambda. This method is efficient because it reuses the existing API Gateway definition and only requires creating a new stage, minimizing resource duplication and management overhead. Canary releases are for gradually rolling out changes to a subset of production users, not for isolated pre-production testing. Changing the API Gateway endpoint type to PRIVATE would make the API inaccessible from the internet, preventing external testing. Deploying a full copy of the production API and Lambda into a new CloudFormation stack is overly complex and resource-intensive for simply testing an updated Lambda function.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed