-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverless.template
More file actions
96 lines (96 loc) · 2.85 KB
/
serverless.template
File metadata and controls
96 lines (96 loc) · 2.85 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
{
"Description":"Simple test project",
"Resources":{
"HashFileFunction":{
"Type":"AWS::Serverless::Function",
"Properties":{
"FunctionName":"HashFiles",
"Handler":"com.serverless.demo.function.HashFiles",
"Runtime":"java8",
"CodeUri":"./target/demo-1.0.0.jar",
"Policies":[
"AmazonDynamoDBFullAccess",
"AmazonS3FullAccess",
"AWSLambdaBasicExecutionRole"
]
}
},
"ProcessS3ZipFunction":{
"Type":"AWS::Serverless::Function",
"Properties":{
"FunctionName":"ProcessS3ZipFunction",
"Handler":"com.serverless.demo.function.ProcessS3Zip",
"Runtime":"java8",
"CodeUri":"./target/demo-1.0.0.jar",
"Policies":[
"AWSLambdaBasicExecutionRole",
"AmazonS3FullAccess",
"AWSLambdaFullAccess"
],
"Events":{
"GetResource":{
"Type":"S3",
"Properties":{
"Bucket":{
"Ref":"FileBucketForUploads"
},
"Events":"s3:ObjectCreated:Put",
"Filter":{
"S3Key":{
"Rules":[
{
"Name":"suffix",
"Value":".jpg"
}
]
}
}
}
}
}
}
},
"InformClientFunction":{
"Type":"AWS::Serverless::Function",
"Properties":{
"FunctionName":"InformClient",
"Handler":"com.serverless.demo.function.InformClient",
"Runtime":"java8",
"CodeUri":"./target/demo-1.0.0.jar",
"Policies":[
"AmazonDynamoDBFullAccess",
"AmazonS3FullAccess",
"AWSLambdaBasicExecutionRole"
]
}
},
"hashTable":{
"Type":"AWS::DynamoDB::Table",
"Properties":{
"TableName":"hashes",
"AttributeDefinitions":[
{
"AttributeName":"fileName",
"AttributeType":"S"
}
],
"KeySchema":[
{
"AttributeName":"fileName",
"KeyType":"HASH"
}
],
"ProvisionedThroughput":{
"ReadCapacityUnits":5,
"WriteCapacityUnits":5
}
}
},
"FileBucketForUploads":{
"Type":"AWS::S3::Bucket",
"Properties":{
"BucketName":"my-object-storage-for-the-paper"
}
}
}
}