File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
- import pulumi
1
+ import pulumi , json
2
2
import pulumi_aws as aws
3
3
from pulumi_docker import Image , DockerBuild
4
4
import pulumi_docker as docker
11
11
docker_image = config .get ("docker_image" )
12
12
environment = config .get ("environment" )
13
13
14
- # First create the DynamoDB table
14
+ # First, create the DynamoDB table
15
15
dynamodb_table = aws .dynamodb .Table (
16
16
f"todo-{ environment } " ,
17
17
name = f"todo-{ environment } " ,
37
37
# Create Lambda execution role
38
38
lambda_role = aws .iam .Role (
39
39
"lambdaExecutionRole" ,
40
- assume_role_policy = json .dumps ({
40
+ assume_role_policy = json .dumps ({ # Use the json module to convert to a JSON string
41
41
"Version" : "2012-10-17" ,
42
42
"Statement" : [{
43
43
"Action" : "sts:AssumeRole" ,
85
85
})
86
86
)
87
87
88
- # 4. IMPORTANT: Attach the policy to the role
88
+ # Attach the policy to the role
89
89
lambda_dynamodb_policy_attachment = aws .iam .RolePolicyAttachment (
90
90
"lambda-dynamodb-policy-attachment" ,
91
91
role = lambda_role .name ,
You can’t perform that action at this time.
0 commit comments