Serverless Application Model Flashcards
What is AWS SAM?
AWS SAM (Serverless Application Model) is a framework for developing and deploying serverless applications using simplified YAML syntax.
What configuration format does SAM use?
YAML.
What does SAM simplify the creation of?
Complex AWS CloudFormation templates.
Which AWS service does SAM use to deploy Lambda functions?
AWS CodeDeploy.
What AWS services can SAM help run locally?
AWS Lambda, API Gateway, and DynamoDB.
What is the Transform header in a SAM template?
Transform: ‘AWS::Serverless-2016-10-31’
What are the key resource types in SAM?
AWS::Serverless::Function, AWS::Serverless::Api, AWS::Serverless::SimpleTable
What command packages and deploys a SAM app?
sam deploy (optionally after sam package)
What is SAM Accelerate?
A feature set to speed up deployments by syncing code and resources faster, without full CloudFormation updates.
What does sam sync do?
Synchronizes code and infrastructure defined in your SAM templates to AWS.
What does sam sync –code do?
Synchronizes only code changes, bypassing infrastructure updates.
What does sam sync –watch do?
Watches files for changes and automatically syncs code or infrastructure depending on what was modified.
What does the SAM CLI offer for debugging?
Local build, invoke, test, and debug capabilities for serverless apps.
Which IDEs are supported for SAM debugging?
AWS Cloud9, Visual Studio Code, JetBrains IDEs (e.g., PyCharm, IntelliJ).
What are AWS Toolkits?
IDE plugins to build, test, debug, deploy, and invoke Lambda functions directly from the IDE.
What is a SAM Policy Template?
Predefined permission sets that simplify attaching IAM policies to Lambda functions.
Name three examples of SAM Policy Templates.
S3ReadPolicy, SQSPollerPolicy, DynamoDBCrudPolicy.
How does SAM integrate with CodeDeploy?
It uses CodeDeploy for traffic shifting and validates deployments using pre/post traffic hooks.
What does AutoPublishAlias do in SAM?
Automatically publishes new versions on code updates and moves the alias to point to the new version.
What are DeploymentPreference options in SAM?
Canary, Linear, AllAtOnce.
How do you start a local Lambda endpoint with SAM?
sam local start-lambda
How do you invoke a Lambda function locally?
sam local invoke
How do you emulate API Gateway locally?
sam local start-api
How can you generate test event payloads in SAM?
sam local generate-event