Skip to content

Instantly share code, notes, and snippets.

@adhorn
Last active April 25, 2018 03:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adhorn/cab4b461f46cc66f27d49e1de4230c7f to your computer and use it in GitHub Desktop.
Save adhorn/cab4b461f46cc66f27d49e1de4230c7f to your computer and use it in GitHub Desktop.
STATUS: 200
service: blog
provider:
name: aws
runtime: python2.7
memorySize: 512
environment:
STATUS: ${file(env.yml):STATUS}
iamRoleStatements:
- Effect: "Allow"
Action:
- "dynamodb:*"
Resource:
- "arn:aws:dynamodb:eu-west-1:xxxxxxxxxxxx:table/MyGlobalTable"
- "arn:aws:dynamodb:eu-central-1:xxxxxxxxxxxx:table/MyGlobalTable"
- Effect: "Allow"
Action:
- "logs:CreateLogGroup"
- "logs:CreateLogStream"
- "logs:PutLogEvents"
- "xray:PutTraceSegments"
- "xray:PutTelemetryRecords"
Resource:
- "*"
package:
include:
- vendored/**
exclude:
- .git/**
functions:
get_item:
handler: get.get_item
events:
- http:
path: get/{item_id}
method: GET
cors: true
create_item:
handler: post.create_item
events:
- http:
path: create
method: POST
cors: true
get_health:
handler: health.lambda_handler
events:
- http:
path: health
method: GET
cors: true
@adhorn
Copy link
Author

adhorn commented Apr 24, 2018

To install the requirements into the folder vendored, use the following command:
pip install -t vendored/ -r requirements.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment