SERVERLESS APPLICATION MODEL Flashcards
SAM
allows deploy server application model
Framework: Deploy and code SAM
All code is YAML
SAM code
YAML Code
SAM YAML File, complex cloudformation code
Cloudformation Support
Outputs Mappings Parameters resources etc
Codedeploy and SAM
SAM can be use CodeDeploy to deploy lambda functions
SAM and Local running programs
Help run
Lambda
API Gateway
DynamoDB locally from computer
SAM recipe 1: Header
First item
Transform: ‘AWS::Serverless-2016-10-31’
SAM recipe 2: Code
AWS::Serverless::Function (lambda)
AWS::Serverless::API (Gateway API)
AWS::Serverless::SimpleTable (DynamoDB)
SAM recipe 3: Package and Deploy
AWS cloudformation Package / Sam Package
AWS cloudformation Deploy / Sam Deploy
Package/Deploy
Packages the local artifacts (local paths) that your AWS CloudFormation template references. The command uploads local artifacts, such as source code for an AWS Lambda function or a Swagger file for an AWS API Gateway REST API, to an S3 bucket. The command returns a copy of your template, replacing references to local artifacts with the S3 location where the command uploaded the artifacts.
Deploys the specified AWS CloudFormation template by creating and then executing a change set. The command terminates after AWS CloudFormation executes the change set. If you want to view the change set before AWS CloudFormation executes it, use the –no-execute-changeset flag.
SAM AWS DEF
INSTALL ONTO COMPUTER!
The AWS Serverless Application Model (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.
All YAML
Complex cloudformation via YAML
Supports most items like Cloudformation: Outputs, mapping, parameters, resources etc
ONLY TWO COMMANDS TO DEPLOY INTO AWS
Sam can use code deploy to deploy lambda functions
** Run Lambda, API gateway, dynamoDB locally***