Skip to content

Commit 18d0087

Browse files
committed
refactor(e2e): fix idempotency typing
1 parent e9741bb commit 18d0087

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
from typing import Any
1+
from typing import Dict
22

33
from aws_cdk import CfnOutput, RemovalPolicy
44
from aws_cdk import aws_dynamodb as dynamodb
5+
from aws_cdk.aws_lambda import Function
56

67
from tests.e2e.utils.infrastructure import BaseInfrastructure
78

89

910
class IdempotencyDynamoDBStack(BaseInfrastructure):
1011
def create_resources(self):
1112
functions = self.create_lambda_functions()
12-
self._create_dynamodb_table(function=functions)
13+
self._create_dynamodb_table(functions=functions)
1314

14-
def _create_dynamodb_table(self, function: Any):
15+
def _create_dynamodb_table(self, functions: Dict[str, Function]):
1516
table = dynamodb.Table(
1617
self.stack,
1718
"Idempotency",
@@ -22,8 +23,8 @@ def _create_dynamodb_table(self, function: Any):
2223
billing_mode=dynamodb.BillingMode.PAY_PER_REQUEST,
2324
)
2425

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"])
2829

2930
CfnOutput(self.stack, "DynamoDBTable", value=table.table_name)

0 commit comments

Comments
 (0)