Serverless Application Model (SAM) Flashcards

1
Q

SAM is both:

A
  • CLI Tool

- CloudFormation Macro. It allows you to change the rules on how code works

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

What are 2 benefits of using CloudFormation macros?

A

Code is easier to read
Less overall code:

A pure CloudFormation file can have 100 lines
With SAM the same stack of resources can use 50 lines

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

Which attribute do you provide in CloudFormation to use a macro?

A

Transform

Transform: ‘AWS::Serverless-2016….”

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

This open-source framework for building serverless applications provides shorthand syntax to express functions, APIs, databases, and event source mappings.

A

AWS Serverless Application Model (SAM)

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

What is the SAM CLI command to turn your SAM application into a Zip file and upload to S3?

A

sam package

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

What are some common SAM CLI Commands?

aws sam ___

A
  • build
  • deploy
  • init
  • logs
  • publish
  • validate
  • package
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the SAM CLI command to check your SAM application for syntax errors?

A

sam validate

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