-
-
Save richardgrantserverless/84a8fba2b74debc960acf7840b70ba72 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
functions: | |
takeScreenshot: | |
handler: handler.take_screenshot | |
timeout: 15 # our screenshots can take a while sometimes | |
events: | |
- http: | |
path: screenshots | |
method: post | |
# Marking the function as private will require a valid api-key | |
private: true | |
request: | |
# we want to mark the url param as required | |
parameters: | |
querystrings: | |
url: true | |
listScreenshots: | |
handler: handler.list_screenshots | |
timeout: 15 | |
events: | |
- http: | |
path: screenshots | |
method: get | |
private: true | |
request: | |
parameters: | |
querystrings: | |
url: true | |
createThumbnails: | |
handler: handler.create_thumbnails | |
events: | |
# this event type will also create the screenshots bucket and trigger | |
# the lambda function every time a file is uploaded (ObjectCreated) | |
- s3: | |
bucket: ${self:custom.bucket_name} | |
event: s3:ObjectCreated:* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment