-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtemplate.yaml
More file actions
37 lines (33 loc) · 958 Bytes
/
template.yaml
File metadata and controls
37 lines (33 loc) · 958 Bytes
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
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: Fibo education [ web crawler ]
Resources:
S3Bucket:
Type: AWS::S3::Bucket
SnapshotFunction:
Type: AWS::Serverless::Function
Description: Invoked by EventBridge scheduled rule
Properties:
CodeUri: src/
Handler: app.handler
Runtime: nodejs12.x
Timeout: 15
MemorySize: 4096
Layers:
- !Sub 'arn:aws:lambda:${AWS::Region}:764866452798:layer:chrome-aws-lambda:22'
Environment:
Variables:
TARGET_URL: 'https://cloud.mn'
S3_BUCKET: !Ref S3Bucket
Policies:
- S3WritePolicy:
BucketName: !Ref S3Bucket
Events:
CheckWebsiteScheduledEvent:
Type: Schedule
Properties:
Schedule: rate(15 minutes)
Outputs:
ConsumerFunction:
Description: SnapshotFunction function name
Value: !Ref SnapshotFunction