A developer built a serverless application with AWS SAM that includes AWS Lambda functions. What is the correct order of steps to deploy the application successfully?
Choose an answer
Tap an option to check your answer.
Correct answer: 1. Build the SAM template locally. 2. Package the SAM template to an Amazon S3 bucket. 3. Deploy the SAM template from the S3 bucket..
Why this is the answer
The correct order for deploying an AWS SAM application is to first build the application, then package it, and finally deploy it. Building locally (using sam build) prepares your application code and dependencies. Packaging (using sam package) uploads the build artifacts, including your Lambda function code and SAM template, to an Amazon S3 bucket, which is a necessary staging step for CloudFormation. Deploying (using sam deploy) then uses the packaged template from the S3 bucket to create or update your resources via AWS CloudFormation. Incorrect options: Building on an EC2 instance and packaging/deploying from EBS are not standard SAM deployment practices. SAM CLI is typically run locally or in a CI/CD pipeline. Packaging must occur before deployment; you cannot deploy from S3 without first packaging the artifacts to S3. CodeCommit is a version control service, not a storage location for packaged SAM artifacts or a deployment target.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed