Skip to content

Commit 3622684

Browse files
author
Adetokunbo Ige
committed
chore: update policy
Signed-off-by: Adetokunbo Ige <[email protected]>
1 parent 04a207b commit 3622684

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

todo-app/__main__.py

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,21 @@
3737
}
3838
)
3939

40-
# Create Lambda execution role
40+
# Create an IAM Role for the Lambda function
4141
lambda_role = aws.iam.Role(f"lambdaExecutionRole-{environment}",
42-
assume_role_policy=json.dumps({
43-
"Version": "2012-10-17",
44-
"Statement": [{
45-
"Action": "sts:AssumeRole",
46-
"Principal": {
47-
"Service": "lambda.amazonaws.com"
48-
},
49-
"Effect": "Allow",
50-
"Sid": ""
51-
}]
52-
})
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+
}"""
5355
)
5456

5557
# Create inline policy for the role

0 commit comments

Comments
 (0)