Question 364:
You and your team have a productive REST API with API Gateway and Lambda as backend. You want to make some code improvements to this API without making disruptions to your customers. Once completed the modifications to Lambda code you want to deploy this new version. How can you achieve this?
Answer options:
A.Create a version in the Lambda with the actual code. This version will be named “1”. After this start to make the modifications to the code. In the integration request of APi Gateway set the Lambda function to ${stageVariables.Lambdaenv}. Create a stage variable called lambdaenv in API gateway Prod stage. Set lambdaenv to the ARN ofversion “1” of the Lambda function. After finishing the modifications, set lambdaenv to the $latest Lambda function ARN.
B.Create a version in the Lambda with the actual code. This version will be named “1”. After this start to make the modifications to the code. In the integration request set the Lambda function to ${lambdaenv}. Create a stage variable called lambdaenv in API gateway Prod stage. Set lambdaenv to the ARN ofversion 1 of the Lambda function. After finishing the modifications, set lambdaenv to the $latest Lambda function ARN.
C.Start to make the modifications to the code. In the integration request of APi Gateway set the Lambda function to ${stageVariables.lambdaenv}. Create a stage variable called lambdaenv in API gateway Prod stage. Set lambdaenv to the ARN of$latest version Lambda function.
D.Start to make the modifications to the code. In the integration request of APi Gateway set the Lambda function to ${stageVariables.lambdaenv}. Create a stage variable called lambdaenv in API gateway Prod stage. Set lambdaenv to the ARN ofversion $initial of the Lambda function. After finishing the modifications, set lambdaenv to the $latest Lambda function ARN.