AWS Certified Developer – Associate (DVA-C02) — Question 254
A company is adopting serverless computing for some of its new services. A development team needs to create a serverless infrastructure by using AWS Serverless Application Model (AWS SAM). All infrastructure must be deployed by using AWS CloudFormation templates.
What should the development team do to meet these requirements?
Answer options
- A. Add a Resources section to the CloudFormation templates that contains AWS::Lambda::Function resources.
- B. Add a Mappings section to the CloudFormation templates that contains AWS::Serverless::Function and AWS::Serverless::API.
- C. Add a Transform section to the CloudFormation templates. Use the AWS SAM syntax to define the resources.
- D. Add a Parameters section to the CloudFormation templates that specifies the relevant AWS SAM Globals section.
Correct answer: C
Explanation
The correct answer is C because adding a Transform section allows the use of AWS SAM syntax, which simplifies the definition of serverless resources. The other options either do not utilize AWS SAM syntax correctly or do not meet the requirements for creating a serverless infrastructure.