AWS SAM Flashcards

1
Q

What is AWS SAM

A

The AWS Serverless Application Model (AWS SAM) is an open-source framework for building serverless applications.

It provides shorthand syntax to express functions, APIs, databases, and event source mappings.

With just a few lines per resource, you can define the application you want and model it using YAML.

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

What happens during Deployment

A

During deployment, SAM transforms and expands the SAM syntax into AWS CloudFormation syntax, enabling you to build serverless applications faster.

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

Cloudformation Support

A

AWS SAM supports all AWS CloudFormation template items such as Outputs, Mappings, Parameters, etc.

AWS SAM is an extension of AWS CloudFormation, so you get the reliable deployment capabilities of CloudFormation.

You can also define resources using CloudFormation in your SAM template and use the full suite of resources, intrinsic functions, and other template features that are available in AWS CloudFormation.

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

SAM CLI

A

To get started with building AWS SAM-based applications, use the AWS SAM CLI. SAM CLI provides a Lambda-like execution environment that lets you locally build, test, and debug applications defined by SAM templates.

You can also use the SAM CLI to deploy your applications to AWS.

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

Key benefits of SAM

A

Single deployment configuration:

You can use SAM to organize related components, share configuration such as memory and timeouts between resources, and deploy all related resources together as a single, versioned entity.

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

Integration with development tools

A

SAM integrates with a suite of AWS serverless tools.

You can find new applications in the AWS Serverless Application Repository

The AWS Cloud9 IDE can be used to author, test, and debug SAM-based serverless applications,

AWS CodeBuild, AWS CodeDeploy, and AWS CodePipeline can be used to build a deployment pipeline.

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

Local testing and debugging

A

You can use SAM CLI to step-through and debug your code.

SAM CLI provides a Lambda-like execution environment locally and helps you catch issues upfront.

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

SAM Template Capabilities

A

A SAM template file is a YAML configuration that represents the architecture of a serverless application.

You use the template to declare all of the AWS resources that comprise your serverless application in one place.

AWS SAM templates are an extension of AWS CloudFormation templates, so any resource that you can declare in an AWS CloudFormation template can also be declared in an AWS SAM template.

All configuration code is in YAML.

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

What Header Indicates a SAM Template

A

The “Transform” header indicates it’s a SAM template: Transform: ‘AWS::Serverless-2016-10-31’

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

What are SAM Resource Types

A
  • AWS::Serverless::Function (AWS Lambda)
  • AWS::Serverless::Api (API Gateway)
  • AWS::Serverless::SimpleTable (DynamoDB)
  • AWS::Serverless::Application (AWS Serverless Application Repository)
  • AWS::Serverless::HttpApi (API Gateway HTTP API)
  • AWS::Serverless::LayerVersion (Lambda layers)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the two commands are required to package and deploy

A

Use either:

  • sam package
  • sam deploy

Or use:

  • aws cloudformation package
  • aws cloudformation deploy
How well did you know this?
1
Not at all
2
3
4
5
Perfectly