What is a serverless framework?
Answer
A serverless framework is a toolset that simplifies deploying and managing serverless applications by abstracting the configuration of cloud provider resources. Instead of manually configuring Lambda, API Gateway, IAM roles, and DynamoDB in the AWS console or raw CloudFormation, frameworks let you define everything in a single configuration file. Major frameworks: (1) Serverless Framework (serverless.com) — the original, most popular framework; uses serverless.yml; supports AWS, Azure, GCP, Cloudflare; (2) AWS SAM (Serverless Application Model) — AWS's official framework; uses template.yaml (CloudFormation extension); integrates with AWS CLI; (3) AWS CDK (Cloud Development Kit) — infrastructure as code using TypeScript/Python/Java; (4) Terraform — multi-cloud IaC, not serverless-specific but widely used; (5) Pulumi — similar to CDK but truly language-native. Frameworks handle packaging, deployment, rollback, and local testing environments.