Code Monkey home page Code Monkey logo

sam-hello-world's Introduction

SAM Hello World

This repository contains a sample AWS Lambda application defined with the AWS Serverless Application Model (SAM).

AWS SAM

Application

The sample application provides a REST API (with API Gateway) with a single endpoint. When this endpoint is requested, a Lambda function is triggered, which sends an email to you via the Simple Notification Service (SNS).

Application

Stages

This repository contains three AWS Lambda applications, where each application is a stage of the final application:

The third stage in sam-hello-world-3 is the final application, and the others are intermediate stages that you would go through when developing the final application. These intermediate stages are included here for learning purposes.

You can deploy each stage as an independent Lambda application to AWS, as described in the following.

Deploy

You can deploy the application to AWS with the SAM CLI:

sam package \
  --template-file template.yml \
  --output-template-file package.yml \
  --s3-bucket <MY_BUCKET>

sam deploy \
  --template-file package.yml \
  --stack-name <MY_STACK> \
  --capabilities CAPABILITY_IAM

You have to provide the name of an existing AWS S3 bucket in your account to the sam package command. The sam package command uploads the application artefacts (in this case the Lambda function code) to this bucket. When you later trigger a deployment with the sam deploy command, AWS gets the artefacts from this bucket.

For installing he SAM CLI, use the following:

pip install aws-sam-cli

Article

This is an accompanying code repository of the following article:

Creating AWS Lambda Applications With SAM

sam-hello-world's People

Contributors

weibeld avatar

Watchers

James Cloos avatar Vineeth Vijay avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.