A developer is using AWS Serverless Application Model (SAM) to deploy a Lambda function that processes incoming orders via Amazon API Gateway. The developer wants to configure the deployment pipeline to perform a canary deployment, shifting 10% of the traffic to the new version for a 5-minute evaluation period before routing the remaining traffic.
The current `template.yaml` is defined below:
yaml
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: Deployment template for order processing service
Resources:
ProcessOrderFunction:
Type: AWS::Serverless::Function
Properties:
Handler: index.handler
Runtime: nodejs18.x
CodeUri: ./src
Events:
PostOrder:
Type: Api
Properties:
Path: /orders
Method: post
Which of the following modifications must the developer make to the template to enable this gradual deployment strategy? (Select TWO.)
- Add the AutoPublishAlias property under the Properties section of ProcessOrderFunction and assign it an alias name.Answer
- Add the DeploymentPreference property under the Properties section of ProcessOrderFunction and set the Type to Canary10Percent5Minutes.Answer
- CRemove the Transform: AWS::Serverless-2016-10-31 declaration from the header to allow standard AWS CloudFormation parsing.
- DIncrease the Timeout property of the ProcessOrderFunction resource to at least 15 minutes to accommodate the 5-minute canary window.
- EModify the Events section to change the Api integration type from a Lambda Proxy integration to a custom integration.