Serverless Application Model Flashcards

1
Q

What is AWS SAM?

A

AWS SAM (Serverless Application Model) is a framework for developing and deploying serverless applications using simplified YAML syntax.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What configuration format does SAM use?

A

YAML.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does SAM simplify the creation of?

A

Complex AWS CloudFormation templates.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which AWS service does SAM use to deploy Lambda functions?

A

AWS CodeDeploy.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What AWS services can SAM help run locally?

A

AWS Lambda, API Gateway, and DynamoDB.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the Transform header in a SAM template?

A

Transform: ‘AWS::Serverless-2016-10-31’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the key resource types in SAM?

A

AWS::Serverless::Function, AWS::Serverless::Api, AWS::Serverless::SimpleTable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What command packages and deploys a SAM app?

A

sam deploy (optionally after sam package)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is SAM Accelerate?

A

A feature set to speed up deployments by syncing code and resources faster, without full CloudFormation updates.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does sam sync do?

A

Synchronizes code and infrastructure defined in your SAM templates to AWS.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does sam sync –code do?

A

Synchronizes only code changes, bypassing infrastructure updates.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does sam sync –watch do?

A

Watches files for changes and automatically syncs code or infrastructure depending on what was modified.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does the SAM CLI offer for debugging?

A

Local build, invoke, test, and debug capabilities for serverless apps.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Which IDEs are supported for SAM debugging?

A

AWS Cloud9, Visual Studio Code, JetBrains IDEs (e.g., PyCharm, IntelliJ).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are AWS Toolkits?

A

IDE plugins to build, test, debug, deploy, and invoke Lambda functions directly from the IDE.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is a SAM Policy Template?

A

Predefined permission sets that simplify attaching IAM policies to Lambda functions.

17
Q

Name three examples of SAM Policy Templates.

A

S3ReadPolicy, SQSPollerPolicy, DynamoDBCrudPolicy.

18
Q

How does SAM integrate with CodeDeploy?

A

It uses CodeDeploy for traffic shifting and validates deployments using pre/post traffic hooks.

19
Q

What does AutoPublishAlias do in SAM?

A

Automatically publishes new versions on code updates and moves the alias to point to the new version.

20
Q

What are DeploymentPreference options in SAM?

A

Canary, Linear, AllAtOnce.

21
Q

How do you start a local Lambda endpoint with SAM?

A

sam local start-lambda

22
Q

How do you invoke a Lambda function locally?

A

sam local invoke

23
Q

How do you emulate API Gateway locally?

A

sam local start-api

24
Q

How can you generate test event payloads in SAM?

A

sam local generate-event