Created
December 5, 2020 17:40
-
-
Save basyusuf/1f553e406784add7f006e7272d3ad25a to your computer and use it in GitHub Desktop.
puppeteer_serverless.yml
This file contains hidden or 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
service: screenshotproject | |
frameworkVersion: '2' | |
custom: | |
bucket: screenshot-buckets-test # Sizin oluşturduğunuz bucket'ın ismi | |
provider: | |
name: aws | |
runtime: nodejs12.x | |
region: eu-central-1 | |
iamRoleStatements: | |
- Effect: Allow | |
Action: | |
- s3:* # S3 ile alakalı tüm izinleri veriyoruz | |
Resource: "arn:aws:s3:::${self:custom.bucket}/*" # Bucket url tanımlaması yapıyoruz | |
functions: | |
takePageScreenshot: | |
handler: handler.main | |
memorySize: 2048 | |
timeout: 10 | |
description: "Captures and saves the page image. Sends the path to the saved image." | |
layers: # Kurulumunu yaptığımız lambda layerımız | |
- arn:aws:lambda:eu-central-1:208565301474:layer:chrome-aws-lambda-layer:1 | |
events: | |
- http: | |
path: /takePageScreenshot | |
method: post |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment