Question #591
A developer is designing an AWS CloudFormation template for a serverless application that includes Amazon API Gateway, AWS Lambda, and Amazon DynamoDB. Which AWS service or tool allows the developer to define these serverless resources using a simplified YAML syntax?
CloudFormation serverless intrinsic functions
AWS Elastic Beanstalk
AWS Serverless Application Model (AWS SAM)
AWS Cloud Development Kit (AWS CDK)
Explanation
The correct answer is C. AWS SAM extends AWS CloudFormation to provide a simplified syntax specifically for serverless applications. It introduces resource types like AWS::Serverless::Function (for Lambda) and AWS::Serverless::Api (for API Gateway), reducing the verbosity of standard CloudFormation templates.
Why other options are incorrect:
- A: CloudFormation intrinsic functions (e.g., Fn::GetAtt) are used for referencing resources within templates but do not simplify serverless resource definitions.
- B: AWS Elastic Beanstalk is a PaaS for deploying applications (e.g., EC2-based), not optimized for serverless architectures.
- D: AWS CDK uses programming languages (e.g., Python, TypeScript) to define infrastructure, not YAML.
Key Point: AWS SAM is purpose-built for serverless applications and uses a streamlined YAML syntax, aligning with the question's requirements.
Answer
The correct answer is: C