-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathneptune-endpoints-info-lambda.json
120 lines (120 loc) · 3.19 KB
/
neptune-endpoints-info-lambda.json
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "AWS Lambda function for retrieving Amazon Neptune endpoint info",
"Parameters": {
"NeptuneClusterId": {
"Description": "Amazon Neptune DB cluster identifier.",
"Type": "String"
},
"Concurrency": {
"Description": "The number of simultaneous executions to reserve for the function (default 1).",
"Type": "Number",
"Default": 1
},
"PollingIntervalSeconds": {
"Description": "Interval (in seconds) between polling the Amazon Neptune management API for endpoint info (default 10).",
"Type": "Number",
"Default": 10
},
"Suspended": {
"Description": "Determines which endoints will be marked as 'suspended' (values 'all', 'none', 'writer', 'reader'; default 'none').",
"Type": "String",
"Default": "none",
"AllowedValues": [
"all",
"none",
"writer",
"reader"
]
},
"S3Bucket": {
"Description": "An Amazon S3 bucket containing the Lambda .jar file.",
"Type": "String"
},
"S3Key": {
"Description": "The Amazon S3 key of the Lambda .jar file (e.g. bin/neptune-endpoints-info-lambda.jar).",
"Type": "String"
}
},
"Resources": {
"LambdaExecutionRole": {
"Type": "AWS::IAM::Role",
"Properties": {
"AssumeRolePolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": [
"lambda.amazonaws.com"
]
},
"Action": [
"sts:AssumeRole"
]
}
]
},
"Path": "/",
"ManagedPolicyArns": [
"arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole",
"arn:aws:iam::aws:policy/AmazonRDSReadOnlyAccess"
]
}
},
"NeptuneEndpointsInfoLambda": {
"Type": "AWS::Lambda::Function",
"Properties": {
"FunctionName": {
"Fn::Sub": "neptune-endpoint-info_${NeptuneClusterId}"
},
"Handler": "software.amazon.lambda.NeptuneEndpointsInfoLambda::handleRequest",
"ReservedConcurrentExecutions": {
"Ref": "Concurrency"
},
"Role": {
"Fn::GetAtt": [
"LambdaExecutionRole",
"Arn"
]
},
"Code": {
"S3Bucket": {
"Ref": "S3Bucket"
},
"S3Key": {
"Ref": "S3Key"
}
},
"Environment": {
"Variables": {
"clusterId": {
"Ref": "NeptuneClusterId"
},
"pollingIntervalSeconds": {
"Ref": "PollingIntervalSeconds"
},
"suspended": {
"Ref": "Suspended"
}
}
},
"MemorySize": 512,
"Runtime": "java8",
"Timeout": "15"
}
}
},
"Outputs": {
"NeptuneEndpointsInfoLambdaArn": {
"Description": "NeptuneEndpointsInfoLambda ARN",
"Value": {
"Fn::GetAtt": [
"NeptuneEndpointsInfoLambda",
"Arn"
]
}
}
}
}