-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsample.yaml
60 lines (56 loc) · 1.75 KB
/
sample.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
general:
lambda_timeout_time: 3
aws:
region:
subnet_ids:
security_group_ids:
lambda_execution_role_name: lambda-execute
lambdas:
- name: lambda_file_reader
description: Downloads the file and publishes `FileDownloaded` event with the contents in it.
source: s3://flows/word_count/reader.py.zip
handler: read_file
runtime: python2.7
- name: lambda_parser
description: Reads contents, parses it into an array of words and publishes a `FileParsed` event with the data in it.
source: s3://flows/word_count/parser.py.zip
handler: parse
runtime: python2.7
- name: lambda_combiner
description: Groups similar words and aggregates the count and publishes a `FileAggregated` with the grouping in it.
source: s3://flows/word_count/combiner.py.zip
handler: parse
runtime: python2.7
- name: lambda_filter
description: Filters out non-words and publishes a 'FileFiltered' with the remainder words in it.
source: s3://flows/word_count/filter.py.zip
handler: filter
runtime: python2.7
- name: lambda_summarize
description: Outputs the word count for every unique word and total words in the file.
source: git://project/blob/master/flows/word_count/summary.py
handler: summarize
runtime: python2.7
subscriptions:
- event: FileUploaded
subscribers:
- lambda_file_reader
- event: FileDownloaded
subscribers:
- lambda_parser
- event: FileParsed
subscribers:
- lambda_combiner
- event: FileAggregated
subscribers:
- lambda_filter
- event: FileFiltered
subscribers:
- lambda_summarize
# Optional - Can be used to track a complete workflow
workflows:
- id: compute_word_count
flow:
- FileUploaded
- FileDownloaded
- FileParsed