Discover how to use AWS CloudFormation and the Serverless Application Model (SAM) to deploy serverless applications using API Gateway, DynamoDB, and Lambda. Learn to define resources in YAML effectively.
Table of Contents
Question
A developer is creating a template that uses AWS CloudFormation to deploy an application. The application is serverless and uses Amazon API Gateway, Amazon DynamoDB, and AWS Lambda.
Which AWS service or tool should the developer use to define serverless resources in YAML?
A. CloudFormation serverless intrinsic functions
B. AWS Elastic Beanstalk
C. AWS Serverless Application Model (AWS SAM)
D. AWS Cloud Development Kit (AWS CDK)
Answer
C. AWS Serverless Application Model (AWS SAM)
Explanation
The correct answer is C. AWS Serverless Application Model (AWS SAM).
AWS Serverless Application Model (AWS SAM) is a service that enables you to build serverless applications on AWS. It provides you with a template specification to define your serverless application, and a command line interface (CLI) tool to build and deploy your application.
AWS SAM template specification is an extension of AWS CloudFormation that simplifies the definition of serverless resources such as API Gateway, DynamoDB, and Lambda. You can use YAML or JSON syntax to write your AWS SAM template. AWS SAM will transform your template into a standard CloudFormation template that can be deployed using CloudFormation.
Option A is incorrect because CloudFormation serverless intrinsic functions are not a service or tool, but a set of functions that you can use within a CloudFormation template to reference serverless resources. For example, you can use the Fn::GetAtt function to get the attributes of a Lambda function, such as its ARN or version.
Option B is incorrect because AWS Elastic Beanstalk is a service that automates the deployment and management of web applications on AWS. It does not support serverless resources such as API Gateway, DynamoDB, and Lambda.
Option D is incorrect because AWS Cloud Development Kit (AWS CDK) is a software development framework that allows you to define your cloud infrastructure using familiar programming languages such as Python, TypeScript, Java, or C#. It does not use YAML syntax to define serverless resources.
The latest AWS Certified Developer – Associate DVA-C02 certification actual real practice exam question and answer (Q&A) dumps are available free, which are helpful for you to pass the AWS Certified Developer – Associate DVA-C02 exam and earn AWS Certified Developer – Associate DVA-C02 certification.