Skip to content

Instantly share code, notes, and snippets.

@elliotforbes
Created February 11, 2018 19:22
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 elliotforbes/c86e0084a961da592e7bd0344145793f to your computer and use it in GitHub Desktop.
Save elliotforbes/c86e0084a961da592e7bd0344145793f to your computer and use it in GitHub Desktop.
service: imgur-clone-functions
frameworkVersion: ">=1.1.0 <2.0.0"
provider:
name: aws
runtime: python3.6
region: eu-west-1
iamRoleStatements: # permissions for all of your functions can be set here
- Effect: Allow
Action: # Gives permission to DynamoDB tables in a specific region
- dynamodb:DescribeTable
- dynamodb:Query
- dynamodb:Scan
- dynamodb:GetItem
- dynamodb:PutItem
- dynamodb:UpdateItem
- dynamodb:DeleteItem
Resource: "arn:aws:dynamodb:eu-west-1:*:*"
functions:
create:
handler: imgur/upload.upload
events:
- http:
path: upload
method: post
cors: true
list:
handler: imgur/list.list
events:
- http:
path: list
method: get
cors: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment