DVA-C02 · Question #323
DVA-C02 Question #323: Real Exam Question with Answer & Explanation
The correct answer is C: Add a Transform section to the CloudFormation templates. Use the AWS SAM syntax to define. Option C is correct because AWS SAM requires a Transform section in the CloudFormation template (specifically Transform: AWS::Serverless-2016-10-31) - this directive tells CloudFormation to process the template through the SAM transform, which converts SAM-specific resource types
Question
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?
Options
- AAdd a Resources section to the CloudFormation templates that contains AWS::Lambda::Function
- BAdd a Mappings section to the CloudFormation templates that contains
- CAdd a Transform section to the CloudFormation templates. Use the AWS SAM syntax to define
- DAdd a Parameters section to the CloudFormation templates that specifies the relevant AWS SAM
Explanation
Option C is correct because AWS SAM requires a Transform section in the CloudFormation template (specifically Transform: AWS::Serverless-2016-10-31) - this directive tells CloudFormation to process the template through the SAM transform, which converts SAM-specific resource types (like AWS::Serverless::Function) into standard CloudFormation resources before deployment.
Why the distractors are wrong:
- A - Adding
AWS::Lambda::Functiondirectly works for plain Lambda deployments, but it's standard CloudFormation, not AWS SAM. SAM is an abstraction layer on top of CloudFormation that simplifies serverless definitions. - B - The
Mappingssection stores static key-value lookup data (e.g., region-to-AMI mappings). It has no role in enabling SAM syntax. - D - The
Parameterssection defines dynamic input values at deploy time. While useful for configuration, it does nothing to enable SAM resource types.
Memory tip: Think of Transform as a translator - SAM is a shorthand language, and Transform tells CloudFormation "translate this SAM shorthand into real CloudFormation before deploying." No transform = no SAM.
Topics
Community Discussion
No community discussion yet for this question.