File tree 1 file changed +7
-6
lines changed
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 1
- from typing import Any
1
+ from typing import Dict
2
2
3
3
from aws_cdk import CfnOutput , RemovalPolicy
4
4
from aws_cdk import aws_dynamodb as dynamodb
5
+ from aws_cdk .aws_lambda import Function
5
6
6
7
from tests .e2e .utils .infrastructure import BaseInfrastructure
7
8
8
9
9
10
class IdempotencyDynamoDBStack (BaseInfrastructure ):
10
11
def create_resources (self ):
11
12
functions = self .create_lambda_functions ()
12
- self ._create_dynamodb_table (function = functions )
13
+ self ._create_dynamodb_table (functions = functions )
13
14
14
- def _create_dynamodb_table (self , function : Any ):
15
+ def _create_dynamodb_table (self , functions : Dict [ str , Function ] ):
15
16
table = dynamodb .Table (
16
17
self .stack ,
17
18
"Idempotency" ,
@@ -22,8 +23,8 @@ def _create_dynamodb_table(self, function: Any):
22
23
billing_mode = dynamodb .BillingMode .PAY_PER_REQUEST ,
23
24
)
24
25
25
- table .grant_read_write_data (function ["TtlCacheExpirationHandler" ])
26
- table .grant_read_write_data (function ["TtlCacheTimeoutHandler" ])
27
- table .grant_read_write_data (function ["ParallelExecutionHandler" ])
26
+ table .grant_read_write_data (functions ["TtlCacheExpirationHandler" ])
27
+ table .grant_read_write_data (functions ["TtlCacheTimeoutHandler" ])
28
+ table .grant_read_write_data (functions ["ParallelExecutionHandler" ])
28
29
29
30
CfnOutput (self .stack , "DynamoDBTable" , value = table .table_name )
You can’t perform that action at this time.
0 commit comments