Skip to content

Commit 8b6f6bc

Browse files
author
Adetokunbo Ige
committed
chore: update policy
Signed-off-by: Adetokunbo Ige <[email protected]>
1 parent 3359188 commit 8b6f6bc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

todo-app/__main__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import pulumi
1+
import pulumi, json
22
import pulumi_aws as aws
33
from pulumi_docker import Image, DockerBuild
44
import pulumi_docker as docker
@@ -11,7 +11,7 @@
1111
docker_image = config.get("docker_image")
1212
environment = config.get("environment")
1313

14-
# First create the DynamoDB table
14+
# First, create the DynamoDB table
1515
dynamodb_table = aws.dynamodb.Table(
1616
f"todo-{environment}",
1717
name=f"todo-{environment}",
@@ -37,7 +37,7 @@
3737
# Create Lambda execution role
3838
lambda_role = aws.iam.Role(
3939
"lambdaExecutionRole",
40-
assume_role_policy=json.dumps({
40+
assume_role_policy=json.dumps({ # Use the json module to convert to a JSON string
4141
"Version": "2012-10-17",
4242
"Statement": [{
4343
"Action": "sts:AssumeRole",
@@ -85,7 +85,7 @@
8585
})
8686
)
8787

88-
# 4. IMPORTANT: Attach the policy to the role
88+
# Attach the policy to the role
8989
lambda_dynamodb_policy_attachment = aws.iam.RolePolicyAttachment(
9090
"lambda-dynamodb-policy-attachment",
9191
role=lambda_role.name,

0 commit comments

Comments
 (0)