Topic 1 Question 256
2 つ選択A developer is using the AWS Serverless Application Model (AWS SAM) to create a prototype for an AWS Lambda function. The AWS SAM template contains an AWS::Serverless::Function resource that has the CodeUri property that points to an Amazon S3 location. The developer wants to identify the correct commands for deployment before creating a CI/CD pipeline.
The developer creates an archive of the Lambda function code named package.zip. The developer uploads the .zip file archive to the S3 location specified in the CodeUri property. The developer runs the sam deploy command and deploys the Lambda function. The developer updates the Lambda function code and uses the same steps to deploy the new version of the Lambda function. The sam deploy command fails and returns an error of no changes to deploy.
Which solutions will deploy the new version?
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.
ユーザの投票
コメント(3)
- 正解だと思う選択肢: CE
C. Update the CodeUri property to reference the local application code folder, AWS SAM will handle packaging and uploading the code to S3 during the "sam deploy" command execution. E.
- "aws cloudformation package" command packages the local artifacts (such as Lambda function code) and uploads them to an S3 bucket. It then generates a CloudFormation template that references these artifacts.
- "aws cloudformation deploy" command deploys the generated CloudFormation template.
A. "aws cloudformation update-stack": without the packaging step, it won't recognize changes in the Lambda function code B. used for stack set instances D. without proper packaging of the local code, it may not detect changes correctly.
👍 5trungtd2024/07/14 - 正解だと思う選択肢: CE
Both Option C and Option E provide efficient and reliable methods to deploy updated Lambda function code using AWS SAM and CloudFormation. They address the deployment issue by ensuring that changes are recognized and appropriately handled, facilitating successful code updates in a CI/CD context.
By updating the CodeUri to reference the local folder, both approaches ensure that SAM or CloudFormation acknowledges code changes, effectively resolving the "no changes to deploy" error and enabling seamless deployments.
👍 3jamesf2024/07/31 - 正解だと思う選択肢: AC
The two correct solutions to deploy the new version of the Lambda function code when sam deploy reports no changes are:
A. Use the aws cloudformation update-stack command instead of the sam deploy command. C. Update the CodeUri property to reference the local application code folder. Use the sam deploy command. These approaches ensure that changes to your Lambda function code are correctly identified and deployed without encountering the "no changes to deploy" error.
👍 2awsaz2024/07/23
シャッフルモード