File tree Expand file tree Collapse file tree 1 file changed +14
-14
lines changed Expand file tree Collapse file tree 1 file changed +14
-14
lines changed Original file line number Diff line number Diff line change 38
38
)
39
39
40
40
# Create an IAM Role for the Lambda function
41
- lambda_role = aws . iam . Role ( f"lambdaExecutionRole- { environment } " ,
42
- assume_role_policy = """{
43
- "Version": "2012-10-17 ",
44
- "Statement": [
45
- {
46
- "Action ": "sts:AssumeRole",
47
- "Principal ": {
48
- "Service ": "lambda.amazonaws.com"
49
- },
50
- "Effect": "Allow" ,
51
- "Sid ": ""
52
- }
53
- ]
54
- }"""
41
+ # Create Lambda execution role
42
+ lambda_role = aws . iam . Role (
43
+ "lambdaExecutionRole " ,
44
+ assume_role_policy = json . dumps ({
45
+ "Version" : "2012-10-17" ,
46
+ "Statement " : [{
47
+ "Action " : "sts:AssumeRole" ,
48
+ "Principal " : {
49
+ "Service" : "lambda.amazonaws.com"
50
+ } ,
51
+ "Effect " : "Allow" ,
52
+ "Sid" : ""
53
+ } ]
54
+ })
55
55
)
56
56
57
57
# Create inline policy for the role
You can’t perform that action at this time.
0 commit comments