Skip to content

Instantly share code, notes, and snippets.

@richardhyatt
Created September 18, 2017 19:24
Show Gist options
  • Select an option

  • Save richardhyatt/460ab6ccea747642ad84518005bb32f0 to your computer and use it in GitHub Desktop.

Select an option

Save richardhyatt/460ab6ccea747642ad84518005bb32f0 to your computer and use it in GitHub Desktop.
Handler: index.js
Runtime: nodejs6.10
CodeUri: 's3://my-code-bucket/my-function.zip'
Description: Creates thumbnails of uploaded images
MemorySize: 1024
Timeout: 15
Policies:
- AWSLambdaExecute # Managed Policy
- Version: '2012-10-17' # Policy Document
Statement:
- Effect: Allow
Action:
- s3:GetObject
- s3:GetObjectACL
Resource: 'arn:aws:s3:::my-bucket/*'
Environment:
Variables:
TABLE_NAME: my-table
Events:
PhotoUpload:
Type: S3
Properties:
Bucket: my-photo-bucket
Tags:
AppNameTag: ThumbnailApp
DepartmentNameTag: ThumbnailDepartment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment