
Answer-first summary for fast verification
Answer: Use AWS Lambda aliases
Use AWS Lambda aliases - A Lambda alias is like a pointer to a specific Lambda function version. You can create one or more aliases for your AWS Lambda function. Users can access the function version using the alias ARN. An alias can only point to a function version, not to another alias. You can update an alias to point to a new version of the function. Event sources such as Amazon S3 invoke your Lambda function. These event sources maintain a mapping that identifies the function to invoke when events occur. If you specify a Lambda function alias in the mapping configuration, you don't need to update the mapping when the function version changes. This is the right choice for the current requirement. Incorrect options: Use Tags to distinguish the different versions - You can tag Lambda functions to organize them by owner, project or department. Tags are freeform key-value pairs that are supported across AWS services for use in filtering resources and adding detail to billing reports. This does not address the given use-case. Use environment variables - You can use environment variables to store secrets securely and adjust your function's behavior without updating code. An environment variable is a pair of strings that are stored in a function's version-specific configuration. The Lambda runtime makes environment variables available to your code and sets additional environment variables that contain information about the function and invocation request. For example, you can use environment variables to point to test, development or production databases by passing it as an environment variable during runtime. This option does not address the given use-case. Deploy your Lambda in a VPC - Amazon Virtual Private Cloud (Amazon VPC) enables you to launch AWS resources into a virtual network that you've defined. This adds another layer of security for your entire architecture. Not the right choice for the given scenario.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You have recently launched an online learning platform leveraging AWS Lambda and AWS Gateway API, and your initial deployment has been a success. As you embark on developing new features for the second version of your platform, you wish to introduce this new version incrementally. Specifically, you want to route only 10% of the incoming user traffic to the new Lambda version while maintaining the rest on the first version.
Which solution should you choose to achieve this traffic splitting?
A
Use environment variables
B
Use Tags to distinguish the different versions
C
Use AWS Lambda aliases
D
Deploy your Lambda in a VPC
No comments yet.