// the find
aws/serverless-application-model
The AWS Serverless Application Model (AWS SAM) transform is a AWS CloudFormation macro that transforms SAM templates into CloudFormation templates.
AWS SAM is Amazon's official CloudFormation macro that shrinks Lambda/API Gateway infrastructure definitions from hundreds of lines of YAML into something a human can read. It's a pre-processor, not a separate runtime: your SAM template gets expanded into standard CloudFormation before anything touches AWS. The target audience is teams already committed to CloudFormation who want shorter templates without switching to CDK or Terraform.
The shorthand genuinely saves work — a function with an API trigger that would be 80 lines of raw CloudFormation collapses to about 10. The Connectors resource (`AWS::Serverless::Connector`) is a real quality-of-life feature: it generates correct IAM policies for common service-to-service wiring without you having to remember the exact action strings. The integration test suite is unusually thorough for an AWS open-source project — hundreds of golden-file comparisons covering most event source combinations. Local testing via `sam local invoke` / `sam sync` is mature and actually useful for development loops.
It's CloudFormation underneath, so you inherit all of CloudFormation's failure modes: cryptic rollback errors, 3-hour stack updates, and the general misery of debugging transforms in the AWS console. The abstraction leaks constantly — anything slightly off the happy path requires `Metadata` overrides or raw CloudFormation resources mixed into the same template, which erodes the readability benefit. SAM doesn't support every Lambda feature on day one; new AWS capabilities often land in CloudFormation months before SAM catches up, leaving you either blocking on a SAM update or falling back to raw resources anyway. There's also no good story for complex multi-account or multi-region deployments — you'll hit walls that CDK or Terraform handle more gracefully.