A company has a mobile app that calls API Gateway, which invokes Lambda functions. They want to test new Lambda function features with a subset of users before full deployment, without affecting other users and with minimal operational effort. What is the simplest way to do this?
Choose an answer
Tap an option to check your answer.
Correct answer: Publish a new version of each Lambda function and create a weighted alias that splits traffic between versions. Update the REST API to use the alias ARN..
Why this is the answer
This option is correct because Lambda aliases with weighted traffic shifting directly address the requirement for testing new features with a subset of users. By publishing a new Lambda version and creating an alias that splits traffic (e.g., 90% to the old version, 10% to the new), you can gradually introduce the new features. Updating the API Gateway to invoke the alias ARN ensures that API Gateway uses this traffic distribution. This method is simple and requires minimal operational effort as it's a built-in Lambda feature. The other options are less ideal: Creating a new REST API with canary deployment on the stage (options 2 and 4) is more complex than necessary. It involves managing a separate API Gateway setup for canary releases, which adds overhead. Using AWS CodeDeploy (option 3) is a valid deployment strategy for Lambda, but creating a weighted alias is a more direct and simpler approach for this specific scenario of splitting traffic between Lambda versions, especially when API Gateway is already involved.
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