What solution meets all the requirements, ensuring the MOST developer velocity?
Create an AWS CodePipeline configuration and set up a post-commit hook to trigger the pipeline after tests have passed. Use AWS CodeDeploy and create a Canary deployment configuration that specifies the percentage of traffic and interval.
Create an AWS CodeBuild configuration that triggers when the test code is pushed. Use AWS CloudFormation to trigger an AWS CodePipeline configuration that deploys the new Lambda versions and specifies the traffic shift percentage and interval.
Create an AWS CodePipeline configuration and set up the source code step to trigger when code is pushed. Set up the build step to use AWS CodeBuild to run the tests. Set up an AWS CodeDeploy configuration to deploy, then select the CodeDeployDefault.LambdaLinea10PercentEvery3Minutes option.
Use the AWS CLI to set up a post-commit hook that uploads the code to an Amazon S3 bucket after tests have passed. Set up an S3 event trigger that runs a Lambda function that deploys the new version. Use an interval in the Lambda function to deploy the code over time at the required percentage.
Explanations:
While AWS CodePipeline can automate the deployment process and a post-commit hook can trigger it, using AWS CodeDeploy for Lambda is not standard practice. Instead, AWS Lambda has built-in support for traffic shifting using alias versions directly, making this approach less efficient for Lambda microservices.
This option incorrectly relies on AWS CloudFormation to trigger the pipeline, which is not a direct integration. Although CodeBuild can trigger on code pushes, the focus should be on using CodePipeline for both build and deployment, making this solution more complex than necessary.
This option correctly uses AWS CodePipeline to manage the entire CI/CD process, integrating AWS CodeBuild for testing. It also specifies traffic shifting using AWS CodeDeploy with a predefined deployment configuration, which fits the requirement for gradual traffic shifts while ensuring developer velocity through automation.
This option relies on manual scripting with the AWS CLI and S3 events, which adds complexity and reduces developer velocity. It does not leverage the integrated capabilities of AWS CodePipeline and CodeDeploy for automated deployments and traffic shifting, making it less optimal for the required solution.