You are planning to use the Serverless Application model which will be used to deploy a serverless application consisting of a Node.js function.
Which of the following steps need to be carried out? Choose 2 answers from the options given below.
Click on the arrows to vote for the correct answer
A. B. C. D.Answer - B and D.
The AWS Documentation gives an example of this.
Here you need to use the same commands and not the cloud formation commands.
For more information on serverless deployment, please refer to the below URL-
https://docs.aws.amazon.com/lambda/latest/dg/serverless-deploy-wt.htmlThe correct answers are B. Use the SAM package command and D. Use the SAM deploy command.
The Serverless Application Model (SAM) is an open-source framework that is used to build serverless applications on AWS. It is used to simplify the deployment of AWS Lambda functions, API Gateway, and DynamoDB tables.
When you use SAM to deploy your application, the following steps need to be carried out:
Write your serverless application code: In this case, you need to write your Node.js function.
Write your SAM template: This is a CloudFormation template that defines your serverless application. It describes the AWS resources required by your application, such as Lambda functions, API Gateway, and DynamoDB tables.
Package your application: This step involves creating a deployment package that includes your Node.js function code and any dependent libraries. This can be done using the SAM package command, which packages your application and uploads it to an S3 bucket.
Deploy your application: This step involves deploying your application to AWS. This can be done using the SAM deploy command, which creates the necessary resources in your AWS account and deploys your application.
Therefore, the correct steps to be carried out are to use the SAM package command to package your application and then use the SAM deploy command to deploy it.
Option A (Use the Lambda package command) is incorrect because the Lambda package command is used to package only the Lambda function code, and does not include the CloudFormation template required for deployment.
Option C (Use the Lambda deploy command) is also incorrect because the Lambda deploy command is used to update the code of an existing Lambda function, and not to deploy a new serverless application.