25. Serverless Application Model (SAM) Flashcards

1
Q

What is SAM?

A

A framework for developing and deploying serverless applications

Generate complex CloudFormation from a simple SAM YAML file

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

What AWS services can SAM help you to run locally?

A

Lambda, API Gateway, DynamoDB

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

What header indicates 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
4
Q

What template code is used for Lambda?

A

AWS::Serverless::Function

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

What template code is used for API Gateway?

A

AWS::Serverless::Api

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

What template code is used for DynamoDB?

A

AWS::Serverless::SimpleTable

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

What are the CLI commands to package and upload to S3 to generate a CF template?

A

> aws cloudformation package

OR

> sam package

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

What are the CLI commands to deploy to CloudFormation?

A

> aws cloudformation deploy

OR

> sam deploy

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

SAM is built on what other service?

A

CloudFormation

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

SAM requires which two template sections?

A

Transform and Resources sections

Resources is required for any CloudFormation template

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

What is the CLI command to fetch dependencies and create local deployment artifacts?

A

> sam build

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

What are the supported SAM resource types?

A
  1. AWS::Serverless::Api
  2. AWS::Serverless::Application
  3. AWS::Serverless::Function
  4. AWS::Serverless::HttpApi
  5. AWS::Serverless::LayerVersion
  6. AWS::Serverless::SimpleTable
  7. AWS::Serverless::StateMachine
How well did you know this?
1
Not at all
2
3
4
5
Perfectly