Which combination of steps will meet these requirements in the MOST operationally efficient way?
(Choose two.)
Use AWS SAM CLI commands in AWS CodeDeploy to invoke the Lambda functions to test the deployment.
Declare the EventInvokeConfig on the Lambda functions in the AWS SAM templates with OnSuccess and OnFailure configurations.
Enable gradual deployments through AWS SAM templates.
Set the deployment preference type to Canary10Percent30Minutes. Use hooks to test the deployment.
Set the deployment preference type to Linear10PercentEvery10Minutes. Use hooks to test the deployment.
Explanations:
Using AWS SAM CLI commands in AWS CodeDeploy does not directly facilitate the testing of Lambda functions post-deployment. While the SAM CLI can be used for local testing, invoking Lambda functions to test a deployment is more appropriately handled through deployment preferences and hooks in AWS CodeDeploy rather than CLI commands.
Declaring EventInvokeConfig with OnSuccess and OnFailure configurations does not address the requirement for gradual deployments or traffic testing for new updates. These configurations are more focused on the behavior of event invocations rather than managing deployment strategies.
Enabling gradual deployments through AWS SAM templates allows for controlled traffic management to new updates. This aligns with the requirement to test a small percentage of traffic directed to new updates before committing to a full deployment.
Setting the deployment preference type to Canary10Percent30Minutes allows for a canary deployment strategy, where 10% of the traffic is directed to the new version for 30 minutes. This allows the team to monitor performance and errors before rolling out the deployment to all users, fulfilling the requirement efficiently.
Setting the deployment preference type to Linear10PercentEvery10Minutes is not optimal for this scenario, as it gradually increases traffic in a linear fashion over time rather than allowing for a controlled, short-term test period. While it does enable gradual rollout, it does not specifically meet the requirement of testing a small percentage of traffic efficiently before a full deployment.