-
Notifications
You must be signed in to change notification settings - Fork 40
/
template.yaml
42 lines (40 loc) · 1.11 KB
/
template.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
AWSTemplateFormatVersion : '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: selenium with headless chromium
Resources:
DeploymentPermission:
Type: "AWS::Lambda::LayerVersionPermission"
Properties:
Action: lambda:GetLayerVersion
LayerVersionArn: !Ref ChromiumLayer
Principal: '*'
ChromiumLayer:
Type: AWS::Serverless::LayerVersion
Properties:
LayerName: chromium-selenium-layer
Description: Headless Chromium and Selenium WebDriver
ContentUri: ./layer
CompatibleRuntimes:
- nodejs8.10
- python3.7
- python2.7
- go1.x
- java8
LicenseInfo: 'MIT'
RetentionPolicy: Retain
Lambdium:
Type: AWS::Serverless::Function
Properties:
Handler: index.handler
Runtime: nodejs8.10
FunctionName: lambdium
Description: headless chromium running selenium
# This needs to be fairly large: chromium needs a lot of memory
MemorySize: 1156
Timeout: 20
Layers:
- !Ref ChromiumLayer
Environment:
Variables:
CLEAR_TMP: "true"
CodeUri: ./src