Which deployment strategy will meet these requirements?
Use AWS CDK to deploy API Gateway and Lambda functions. When code needs to be changed, update the AWS CloudFormation stack and deploy the new version of the APIs and Lambda functions. Use a Route 53 failover routing policy for the canary release strategy.
Use AWS CloudFormation to deploy API Gateway and Lambda functions using Lambda function versions. When code needs to be changed, update the CloudFormation stack with the new Lambda code and update the API versions using a canary release strategy. Promote the new version when testing is complete.
Use AWS Elastic Beanstalk to deploy API Gateway and Lambda functions. When code needs to be changed, deploy a new version of the API and Lambda functions. Shift traffic gradually using an Elastic Beanstalk blue/green deployment.
Use AWS OpsWorks to deploy API Gateway in the service layer and Lambda functions in a custom layer. When code needs to be changed, use OpsWorks to perform a blue/green deployment and shift traffic gradually.
Explanations:
While AWS CDK can be used to deploy serverless applications, using a Route 53 failover routing policy is not optimal for a canary release strategy. A canary deployment typically involves gradually shifting traffic to new versions of an application rather than a failover approach, which is more suited for disaster recovery scenarios.
This option effectively uses AWS CloudFormation to manage deployment and updates. It leverages Lambda function versions for safe code changes, and it allows for a canary release strategy by promoting new versions gradually, which aligns with the company’s requirement to test features with a small user base before full rollout.
AWS Elastic Beanstalk is not the ideal choice for deploying API Gateway and Lambda functions, as it is primarily designed for traditional applications rather than serverless architectures. Additionally, blue/green deployments are not directly applicable in this context, as they usually apply to more traditional server-based applications.
AWS OpsWorks is primarily a configuration management service, not a preferred tool for deploying API Gateway and Lambda functions. While it can manage deployments, it does not provide built-in support for serverless architectures, and the blue/green deployment model is not as straightforward as with other AWS services specifically designed for serverless applications.