Which solutions will deploy the new version?
(Choose two.)
Use the aws cloudformation update-stack command instead of the sam deploy command.
Use the aws cloudformation update-stack-instances command instead of the sam deploy command.
Update the CodeUri property to reference the local application code folder. Use the sam deploy command.
Update the CodeUri property to reference the local application code folder. Use the aws cloudformation create-change-set command and the aws cloudformation execute-change-set command.
Update the CodeUri property to reference the local application code folder. Use the aws cloudformation package command and the aws cloudformation deploy command.
Explanations:
aws cloudformation update-stackcan be used to update CloudFormation stacks, but it does not work for SAM-specific deployments. SAM requires thesam deploycommand.
aws cloudformation update-stack-instancesis not a valid AWS CLI command. The correct command isaws cloudformation update-stack.
Updating theCodeUriproperty to reference a local application code folder allowssam deployto package and deploy the new code.
aws cloudformation create-change-setandaws cloudformation execute-change-setare used for managing stack changes, but SAM requiressam deployfor deployments.
Updating theCodeUrito reference the local code folder and usingaws cloudformation packagefollowed byaws cloudformation deploycorrectly packages and deploys the Lambda function.