https://github.com/andrejmaya/aws-sam-examples
Simple SAM based functions like SendMail with Lambda, Python app with DynamoDB and others
https://github.com/andrejmaya/aws-sam-examples
Last synced: about 1 year ago
JSON representation
Simple SAM based functions like SendMail with Lambda, Python app with DynamoDB and others
- Host: GitHub
- URL: https://github.com/andrejmaya/aws-sam-examples
- Owner: andrejmaya
- Created: 2018-07-22T05:53:10.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-30T22:20:21.000Z (almost 8 years ago)
- Last Synced: 2025-04-08T17:06:06.269Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 9.77 KB
- Stars: 2
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AWS SAM Examples
# Overview
This repository contain following SAM based functions:
* app.py: simple Hello World example
* SendEmail: sending Email with Lambda and API Gateway
## Usage
* Create a S3 bucket: `aws s3 mb s3://$S3_BUCKET`
* Build project: see `build` in `buildspec.yml`
* Deploy:
```
aws cloudformation deploy --template-file ./serverless-output.yaml --stack-name $S3_BUCKET --capabilities=CAPABILITY_IAM
```
## Test Lambda locally
* `sam local start-lambda` + `sam local invoke HelloWorldFunction --event ./test/HelloWorldPayload.json`
## Test Api locally
* `sam local start-api` + `curl http://localhost:3000/hello?name=SAM_TEST`