Skip to content

Instantly share code, notes, and snippets.

@Sandeepv68
Created August 24, 2018 07:21
Show Gist options
  • Save Sandeepv68/554a3dcc15d0958c3798cc694dd3abd1 to your computer and use it in GitHub Desktop.
Save Sandeepv68/554a3dcc15d0958c3798cc694dd3abd1 to your computer and use it in GitHub Desktop.
service: thumbnailer-service # NOTE: update this with your service name
plugins:
- serverless-offline
- serverless-plugin-existing-s3
provider:
name: aws
stage: dev
region: us-east-1
profile: default
runtime: nodejs6.10
memorySize: 256
timeout: 30
iamRoleStatements:
- Effect: "Allow"
Action:
- "sns:*"
Resource: "*"
- Effect: "Allow"
Action:
- "s3:*"
Resource:
Fn::Join:
- ""
- - "*"
functions:
thumbnailer:
handler: index.thumbnailer
events:
- s3:
bucket: <your-bucket-name>
event: s3:ObjectCreated:*
rules:
- prefix: <folder-name>/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment