Which change to the AWS SAM template will meet these requirements?
Set the Deployment Preference Type to Canary10Percent10Minutes. Set the AutoPublishAlias property to the Lambda alias.
Set the Deployment Preference Type to Linear10PercentEvery10Minutes. Set AutoPublishAlias property to the Lambda alias.
Set the Deployment Preference Type to Canary10Percent10Minutes. Set the PreTraffic and PostTraffic properties to the Lambda alias.
Set the Deployment Preference Type to Linear10PercentEvery10Minutes. Set PreTraffic and PostTraffic properties to the Lambda alias.
Explanations:
Setting the Deployment Preference Type toCanary10Percent10Minutesallows for 10% of traffic to be routed to the new deployment for the first 10 minutes, which meets the requirement. TheAutoPublishAliasproperty ensures the Lambda function is automatically published with an alias, facilitating traffic shifting.
TheLinear10PercentEvery10Minutesoption would gradually shift traffic over a longer period (10% every 10 minutes), rather than the required immediate 10% shift for the first 10 minutes. This does not fulfill the requirement for the traffic shift.
While theCanary10Percent10Minutesoption is correct for the traffic shift, the PreTraffic and PostTraffic properties are not required for simply shifting traffic; they are used for invoking functions before and after the traffic shift, which is not necessary in this scenario.
Similar to option B, theLinear10PercentEvery10Minutesoption does not fulfill the requirement for a quick traffic shift and instead distributes the traffic over time. Also, the use of PreTraffic and PostTraffic is not applicable in this case.