Option C seems right since SAM is basically CloudFormation's serverless extension for YAML templates. CDK (D) is also used to define serverless stuff, but it's mainly in code (Python, TS). If the question was less strict about YAML, maybe D could work too. Pretty sure C is what they're looking for, but open to debate.
Likely it's C here. AWS SAM is made specifically for defining serverless resources like Lambda, API Gateway, and DynamoDB using YAML in CloudFormation templates. D (CDK) is for writing infrastructure as code in languages like Python or TypeScript, not straight YAML editing-easy to mix up if you miss the format detail. If anyone disagrees let me know, but I think C fits best.
Pretty clear to me it's C. AWS SAM is purpose-built for defining serverless resources like Lambda, API Gateway, and DynamoDB directly in YAML templates for CloudFormation. D (CDK) is tempting but it's all about writing code in languages like Python or Typescript, not editing YAML. Easy to mix those up, but "YAML" in the question tips it toward C. Anyone disagree?