exam questions

Exam AWS Certified Developer Associate All Questions

View all questions & answers for the AWS Certified Developer Associate exam

Exam AWS Certified Developer Associate topic 1 question 32 discussion

Exam question from Amazon's AWS Certified Developer Associate
Question #: 32
Topic #: 1
[All AWS Certified Developer Associate Questions]

A developer is creating a script to automate the deployment process for a serverless application. The developer wants to use an existing AWS Serverless
Application Model (AWS SAM) template for the application.
What should the developer use for the project? (Choose two.)

  • A. Call aws cloudformation package to create the deployment package. Call aws cloudformation deploy to deploy the package afterward.
  • B. Call sam package to create the deployment package. Call sam deploy to deploy the package afterward.
  • C. Call aws s3 cp to upload the AWS SAM template to Amazon S3. Call aws lambda update-function-code to create the application.
  • D. Create a ZIP package locally and call aws serverlessrepo create-application to create the application.
  • E. Create a ZIP package and upload it to Amazon S3. Call aws cloudformation create-stack to create the application.
Show Suggested Answer Hide Answer
Suggested Answer: AB 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
quanlh
Highly Voted 3 years, 4 months ago
A + B is correct
upvoted 23 times
...
saeidp
Highly Voted 3 years, 4 months ago
A and B are identical and both are valid
upvoted 13 times
...
ShiaH
Most Recent 5 days, 2 hours ago
Selected Answer: AE
A and E is correct
upvoted 1 times
...
sumanshu
1 month, 3 weeks ago
Selected Answer: AB
B) Correct - sam package: This command packages your AWS SAM application by uploading local Lambda function code and dependencies to Amazon S3 and generating an updated AWS CloudFormation template. sam deploy: This command deploys the AWS SAM application using the generated CloudFormation template. It automatically handles the process of deploying the serverless application to AWS, including Lambda functions, API Gateway, and other resources defined in the template.
upvoted 1 times
sumanshu
1 month, 3 weeks ago
A) Correct - aws cloudformation package: This command is part of the AWS CLI and performs a similar function to sam package, packaging your application and uploading Lambda code to S3. It generates an updated CloudFormation template. aws cloudformation deploy: This command deploys the application using the CloudFormation template, creating the necessary resources, including AWS Lambda, API Gateway, etc. This approach uses the AWS CLI rather than the SAM CLI, but it is still valid for deploying serverless applications. It is more generic, using native CloudFormation commands.
upvoted 2 times
...
...
AsmaZoheb
1 year ago
Selected Answer: AB
sam package sam deploy - aws cloudformation package aws cloudformation deploy
upvoted 2 times
...
rcaliandro
1 year, 7 months ago
Selected Answer: AB
A and B are hundred percent correct. We can use SAM client to build our application in local and create a standard template. Once the template is ready, we need first to package it (this will create a CloudFormation template in S3 with resource) and then deploy it (this will run all the configurations in the CloudFormation and will create the resources on the cloud). We can do that by using sam or aws cloud formation: - sam package sam deploy - aws cloudformation package aws cloudformation deploy Are both valid commands (A and B).
upvoted 1 times
...
MrTee
1 year, 9 months ago
Selected Answer: AB
Both options A and B allow the developer to use an existing AWS SAM template to create a deployment package and deploy it using either the AWS CLI or the SAM CLI.
upvoted 2 times
...
OtavioC
1 year, 9 months ago
Selected Answer: AE
A + E makes more sense to me
upvoted 1 times
...
dp8719823
1 year, 10 months ago
Selected Answer: BE
The correct options are: B. Call sam package to create the deployment package. Call sam deploy to deploy the package afterward. E. Create a ZIP package and upload it to Amazon S3. Call aws cloudformation create-stack to create the application. Explanation: AWS Serverless Application Model (AWS SAM) is a framework for building serverless applications. It uses AWS CloudFormation to define the infrastructure as code and provides shorthand syntax to simplify the definition of AWS resources. To deploy a serverless application with AWS SAM, you can use the following steps: Package the AWS SAM application using the sam package command. This command will package the source code and its dependencies into a deployment package and upload it to an Amazon S3 bucket. Deploy the AWS SAM application using the sam deploy command. This command will create or update the CloudFormation stack that represents your application and its resources.
upvoted 2 times
...
MMaquis
1 year, 11 months ago
Selected Answer: AB
Certainly A,B
upvoted 1 times
...
hb0011
2 years ago
Selected Answer: AB
AB is the one
upvoted 1 times
...
BobAWS23
2 years ago
AAABBB
upvoted 1 times
...
roaol
2 years ago
Selected Answer: BE
not sure about E but B is correct because, The sam package command zips your code artifacts, uploads them to Amazon S3, and produces a packaged AWS SAM template file that's ready to be used. The sam deploy command uses this file to deploy your application. To deploy an application that contains one or more nested applications, you must include the CAPABILITY_AUTO_EXPAND capability in the sam deploy command. Hence, the correct answers in this scenario are: - sam package - sam deploy aws cloudformation deploy is incorrect because this is primarily used for deploying a CloudFormation template file and not a SAM template file. aws cloudformation package is incorrect because this would be more suitable if you're dealing with an AWS CloudFormation template. Since it was mentioned in the scenario that a serverless application is being developed, SAM would be a better fit for packaging the application's code and dependencies.
upvoted 1 times
...
ayoubmk
2 years, 1 month ago
Selected Answer: AB
By elimination, I don't see any automation in C, D & E
upvoted 1 times
...
SBoksh
2 years, 2 months ago
Selected Answer: AB
sam package creates .zip and uploads to s3 https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-cli-command-reference-sam-package.html
upvoted 1 times
...
gpit
2 years, 2 months ago
Selected Answer: BE
SAM is just an extension of CloudFormation, operationally it's similar to CF.
upvoted 2 times
...
JP_PA
3 years ago
Selected Answer: AB
ANS: A&B
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago