What is AWS SAM?
An open-source framework used to build serverless applications on AWS. It is an extension of AWS CloudFormation.
Why is SAM used over plain CloudFormation for serverless apps?
SAM provides a simplified syntax and shorthand to declare serverless resources (e.g., a single AWS::Serverless::Function resource instead of multiple Lambda and IAM resources).
What does a SAM template ultimately compile down to for deployment?
A standard AWS CloudFormation template.
What are the three core resource types provided by SAM?
AWS::Serverless::Function (Lambda)AWS::Serverless::Api (API Gateway) 3. AWS::Serverless::SimpleTable (DynamoDB)What is the primary function of the sam build command?
It processes the template and compiles the application code (e.g., installing dependencies) into an artifact ready for deployment.
What is the primary function of the sam deploy command?
It packages and uploads the application artifacts to S3, and then uses that package to deploy the application via CloudFormation.
What is the purpose of the sam local invoke command?
To test a single Lambda function locally on your development machine, without deploying to AWS.
What is the purpose of the sam local start-api command?
To run a local mock of the full API Gateway and Lambda environment, allowing you to test the API endpoints via your browser or a tool like cURL.
What is the key benefit of using Global Accelerators with your SAM application?
It provides static entry points for your application and improves performance for non-HTTP traffic that SAM can handle (though SAM typically focuses on HTTP via API Gateway).
What does SAM stand for?
Serverless Application Model
A developer is building a serverless application using SAM. They want to define a simple API that triggers a Lambda function. Which SAM resource type should be used?
AWS::Serverless::Function