Aws - Serverless Application Model (Sam)

Card Puncher Data Processing

About

The AWS Serverless Application Model (AWS SAM) is an open-source framework that you can use to build serverless applications on AWS.

Cli

With the AWS SAM CLI, you can invoke Lambda functions locally, create a deployment package for your serverless application, deploy your serverless application to the AWS Cloud, and so on

Local Serverless AWS testing (SAM)

Code for AWS Lambda functions is delivered to the service by uploading the function code in a .zip package to an Amazon S3 bucket. The SAM CLI automates that process for us. Using it, we can create a CloudFormation template that references locally in the filesystem where all of the code for our Lambda function is stored. Then, the SAM CLI will package it into a .zip file, upload it to a configured Amazon S3 bucket, and create a new CloudFormation template that indicates the location in S3 where the created .zip package has been uploaded for deployment to AWS Lambda. We can then deploy that SAM CLI-generated CloudFormation template to AWS and watch the environment be created along with the Lambda function that uses the SAM CLI-uploaded code package.

Lambda Doc

Install

Install doc

Requirement:

  • Docker installed and running to be able to run serverless projects and functions locally with the AWS SAM CLI. The AWS SAM CLI uses the DOCKER_HOST environment variable to contact the Docker daemon.
  • For Windows users: The AWS SAM CLI requires that the project directory (or any parent directory) is listed in Docker Shared Drives.

Installation mode:

  • With pip:
:: install
pip install --user aws-sam-cli
:: or upgrade
pip install --user --upgrade aws-sam-cli
:: or uninstall
npm uninstall -g aws-sam-local

Verification:

sam --version
SAM CLI, version 0.14.2

Specification

The AWS SAM specification is an open-source specification under the Apache 2.0 license. The current version of the AWS SAM specification is available in the AWS SAM GitHub repo.





Discover More
Aws User Click Event Processing Architecture
Aws - Click Event Rest API (Capture user behavior)

Adapted from the Aws tutorial - Building a Modern app (module 5). Click Event records will be processed in real-time by a serverless code function, aggregated, and stored for any future analysis that...
Card Puncher Data Processing
Aws - Lambda Function

AWS Lambda run code in response to events such as an HTTP request. A lambda function (Serverless code) can defined using AWS SAM. Every Lambda function has an IAM role associated with it. This role...
Card Puncher Data Processing
Aws - Serverless

in Aws The Amplify Command Line Interface (CLI) is a unified toolchain to create and manage a serverless infrastructure on AWS. The AWS Serverless Application Model (AWS SAM) is an open-source framework...
Card Puncher Data Processing
Code Design - function-as-a-service (faas) - Serverless function

function-as-a-service (faas) is a cloud offer where you can run a function without server. serverless function are functions that are deployed in a serverless framework. They are the lowest level of...



Share this page:
Follow us:
Task Runner