[Developer] SAM Flashcards

(11 cards)

1
Q

What is AWS SAM?

A

An open-source framework used to build serverless applications on AWS. It is an extension of AWS CloudFormation.

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

Why is SAM used over plain CloudFormation for serverless apps?

A

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).

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

What does a SAM template ultimately compile down to for deployment?

A

A standard AWS CloudFormation template.

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

What are the three core resource types provided by SAM?

A
  1. AWS::Serverless::Function (Lambda)
  2. AWS::Serverless::Api (API Gateway) 3. AWS::Serverless::SimpleTable (DynamoDB)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the primary function of the sam build command?

A

It processes the template and compiles the application code (e.g., installing dependencies) into an artifact ready for deployment.

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

What is the primary function of the sam deploy command?

A

It packages and uploads the application artifacts to S3, and then uses that package to deploy the application via CloudFormation.

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

What is the purpose of the sam local invoke command?

A

To test a single Lambda function locally on your development machine, without deploying to AWS.

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

What is the purpose of the sam local start-api command?

A

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.

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

What is the key benefit of using Global Accelerators with your SAM application?

A

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).

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

What does SAM stand for?

A

Serverless Application Model

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

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?

A

AWS::Serverless::Function

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