-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paths3-copy-arc-project.jsonnet
64 lines (63 loc) · 1.5 KB
/
s3-copy-arc-project.jsonnet
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
61
62
63
64
local props = import '../.properties.libsonnet';
local stage = props.stage;
local account = props.account;
local region = props.region;
local bucketName = stage +'-native-copy-' + account + '-' + region;
local bucketPrefix = 's3://' + bucketName;
local unit = 'Twelfths';
{
project: {
name: 'S3Simple',
version: '20230101-00',
},
placement: {
stage: stage,
provider: 'aws',
account: account,
region: region,
},
resources: [
{
type: 'aws:core:s3Bucket',
name: 'bucket',
bucketName: bucketName,
},
],
// Boundaries are the interface with the outside world.
boundaries: [
{
type: 'aws:core:s3PutListenerBoundary',
name: 'IngressPutListener',
// infrequent: one event per interval
// frequent: many events per interval, slightly higher cost
eventArrival: "infrequent",
dataset: {
name: 'ingress-simple',
version: '20220101',
pathURI: bucketPrefix + '/ingress/',
},
lotUnit: unit,
},
],
// Arcs listen for availability events, run the declared workload, and publish new availability events
arcs: [
{
// a native built in arc module
type: 'aws:core:s3CopyArc',
name: 'copyA',
sources: {
main: {
name: 'ingress-simple',
version: '20220101',
},
},
sinks: {
main: {
name: 'copy-a-simple',
version: '20230101',
pathURI: bucketPrefix + '/copy-a/',
},
},
},
],
}