Skip to content

Instantly share code, notes, and snippets.

@elliotforbes
Created February 22, 2018 19:26
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/384a416e3395dc0876964241ee0ac5f9 to your computer and use it in GitHub Desktop.
Save elliotforbes/384a416e3395dc0876964241ee0ac5f9 to your computer and use it in GitHub Desktop.
service: imgur-clone-functions
frameworkVersion: ">=1.1.0 <2.0.0"
custom:
bucket: imgur-serverless
provider:
name: aws
runtime: python3.6
region: eu-west-1
iamRoleStatements: # permissions for all of your functions can be set here
- Effect: Allow
Action:
- s3:PutObject
- S3:PutObjectAcl
Resource: "arn:aws:s3:::${self:custom.bucket}/*"
functions:
uploadjs:
handler: getSignedUpload.requestUploadURL
runtime: nodejs6.10
events:
- http:
path: upload-node
method: post
cors: true
authorizer:
arn: arn:aws:cognito-idp:eu-west-1:853957954650:userpool/eu-west-1_9IBAarCx9
identitySource: method.request.header.Authorization
type: token
list:
handler: 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