What is AWS SAM (Serverless Application Model)?

Answer

AWS SAM is AWS's open-source framework for building serverless applications. It extends CloudFormation with serverless-specific resource types and shorthand. Key features: (1) Simplified syntaxAWS::Serverless::Function replaces complex CloudFormation Lambda + IAM + Event Source Mapping resources; (2) Local testingsam local invoke runs Lambda locally in a Docker container; sam local start-api runs API Gateway locally; (3) Deploymentsam build packages dependencies; sam deploy --guided deploys with an interactive wizard; (4) AWS native — uses CloudFormation under the hood, inheriting all CloudFormation features; (5) LayersAWS::Serverless::LayerVersion for shared code; (6) ConnectorsAWS::Serverless::Connector automatically configures IAM permissions between resources. SAM is the recommended AWS-native choice for greenfield serverless projects, while CDK is preferred for teams comfortable with TypeScript/Python code-first infrastructure definition.