Which combination of steps will meet these requirements with the LEAST development effort?
(Choose two.)
Create a new resource in the current stage. Create a new method with Lambda proxy integration. Select the Lambda function. Add the hotfix alias. Redeploy the current stage. Test the backend.
Update the Lambda function in the API Gateway API integration request to use the hotfix alias. Deploy the API Gateway API to a new stage named hotfix. Test the backend.
Modify the Lambda function by fixing the code. Test the Lambda function. Create the alias hotfix. Point the alias to the $LATEST version.
Modify the Lambda function by fixing the code. Test the Lambda function. When the Lambda function is working as expected, publish the Lambda function as a new version. Create the alias hotfix. Point the alias to the new version.
Create a new API Gateway API for the development environment. Add a resource and method with Lambda integration. Choose the Lambda function and the hotfix alias. Deploy to a new stage. Test the backend.
Explanations:
Creating a new resource in the current stage and deploying with a hotfix alias does not isolate the changes properly for testing and may still allow other developers to overwrite changes. Also, this approach doesn’t utilize versioning effectively, making it less safe for production validation.
Updating the Lambda function integration to use a hotfix alias and deploying to a new stage named “hotfix” allows the developer to test the changes in isolation without affecting the production environment. This method provides a clear separation for testing.
Fixing the code and creating a hotfix alias pointing to the $LATEST version does not ensure that the changes are tested in a stable environment, as $LATEST can change if other developers deploy new changes. This approach does not prevent overwrites during the test cycle.
Modifying the Lambda function and then publishing a new version ensures that the hotfix can be tested reliably. The hotfix alias can point to the new version, preventing other developers from affecting the test cycle with changes to $LATEST, thus isolating the testing environment.
Creating a new API Gateway API adds unnecessary complexity and overhead to the development process. It also does not utilize existing infrastructure effectively, making it a less efficient solution for creating a development environment for testing the code changes.