-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlambda_function.cform
46 lines (46 loc) · 1.31 KB
/
lambda_function.cform
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
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Lambda function - Enable S3 server access logging.",
"Parameters": {
"LambdaCodeBucket": {
"Description": "Supply bucket name where you saved lambda.zip",
"Type": "String",
"Default": "my-very-own-bucket"
},
"LambdaRoleArn": {
"Description": "Supply lambda role arn",
"Type": "String",
"Default": "arn:"
}
},
"Resources": {
"LambdaFunction": {
"Type": "AWS::Lambda::Function",
"Properties": {
"Code": {
"S3Bucket": {
"Ref": "LambdaCodeBucket"
},
"S3Key": "lambda.zip"
},
"Description": "Enable S3 bucket logging",
"Handler": "lambda-enable_bucket_logging.lambda_handler",
"Role": {
"Ref": "LambdaRoleArn"
},
"Runtime": "python2.7",
"Timeout": "300"
}
}
},
"Outputs": {
"LambdaFunctionArn": {
"Value": {
"Fn::GetAtt": [
"LambdaFunction",
"Arn"
]
}
}
}
}