An API Gateway REST API has a single resource with a GET method integrated with a Lambda function. You published a new version of the Lambda function and want to test it before routing production traffic to it. Tests must not affect the production REST API and should require minimal operational overhead. What should you do?
Choose an answer
Tap an option to check your answer.
Correct answer: Create a new stage for the REST API, define a stage variable that points to the Lambda function, set the API Gateway integrated Lambda function name to that stage variable, and deploy..
Why this is the answer
Creating a new stage for the REST API and using stage variables is the most effective solution for testing new Lambda versions without impacting production. A new stage allows you to deploy and test the updated Lambda function in isolation. Stage variables enable you to dynamically reference different Lambda function versions or aliases based on the stage, providing a clean way to switch between test and production environments. This approach offers minimal operational overhead compared to creating entirely new resources or APIs. Adding a new resource or creating an entirely new REST API would introduce unnecessary complexity and management overhead. Changing the existing GET method integration directly would immediately impact production traffic, which is explicitly what the question aims to avoid.
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