-
-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathfunction.json
47 lines (47 loc) · 1.41 KB
/
function.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
{
"Architectures": [
"x86_64"
],
"Description": "hello function",
"EphemeralStorage": {
"Size": 1024
},
"Environment": {
"Variables": {
"JSON": "{{ env `JSON` | json_escape }}",
"PREFIXED_TFSTATE_1": "{{ prefix1_tfstate `data.aws_iam_role.lambda.arn` }}",
"PREFIXED_TFSTATE_2": "{{ prefix2_tfstate `data.aws_iam_role.lambda.arn` }}"
}
},
"FunctionName": "{{ must_env `FUNCTION_NAME` }}",
"FileSystemConfigs": [
{
"Arn": "arn:aws:elasticfilesystem:ap-northeast-1:{{ caller_identity.Account }}:access-point/fsap-04fc0858274e7dd9a",
"LocalMountPath": "/mnt/lambda"
}
],
"Handler": "index.js",
"LoggingConfig": {
"ApplicationLogLevel": "DEBUG",
"LogFormat": "JSON",
"LogGroup": "/aws/lambda/{{ must_env `FUNCTION_NAME` }}/json",
"SystemLogLevel": "INFO"
},
"MemorySize": 128,
"Role": "{{ tfstate `data.aws_iam_role.lambda.arn` }}",
"Runtime": "nodejs16.x",
"Timeout": 5,
"TracingConfig": {
"Mode": "PassThrough"
},
"VpcConfig": {
"SubnetIds": [
"subnet-08dc9a51660120991",
"subnet-023e96b860485e2ad",
"subnet-045cd24ab8e92a20d"
],
"SecurityGroupIds": [
"{{ tfstatef `aws_security_group.internal['%s'].id` (must_env `WORLD`) }}"
]
}
}