-
Notifications
You must be signed in to change notification settings - Fork 40
/
scheduled-event.yaml
26 lines (25 loc) · 1008 Bytes
/
scheduled-event.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
# Visits the PAGE_URL every minute using Cloudwatch Events
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: lambdium scheduled script example
Resources:
SyntheticTrafficFunction:
Type: AWS::Serverless::Function
Properties:
# packaged lambdium archive @ v0.1.2
CodeUri: s3://lambdium-upload-bucket/4fcc083b4f8302daf6c68d19001d8c8d
Runtime: nodejs6.10
Handler: index.handler
MemorySize: 1154
Timeout: 25
Environment:
Variables:
PAGE_URL: "http://www.google.com"
Events:
CheckWebsiteScheduledEvent:
Type: Schedule
Properties:
# Must follow this syntax: https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html
Schedule: rate(1 minute)
# To specify a script directly, use the Input parameter and remove the PAGE_URL environment variable:
# Input: '{"Base64Script": "JGJyb3dzZXIuZ2V0KCdodHR..."}'