Skip to content

Commit 8a54539

Browse files
committed
aws_dynamodb
1 parent 996ef19 commit 8a54539

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lambdas/batch_processor_filter/src/batch_audit_repository.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import boto3
21
from boto3.dynamodb.conditions import Key
32

3+
from common.aws_dynamodb import get_dynamodb_table
44
from constants import (
55
AUDIT_TABLE_FILENAME_GSI,
66
AUDIT_TABLE_NAME,
@@ -22,7 +22,7 @@ class BatchAuditRepository:
2222
_PROCESSING_AND_FAILED_STATUSES = {FileStatus.PROCESSING, FileStatus.FAILED}
2323

2424
def __init__(self):
25-
self._batch_audit_table = boto3.resource("dynamodb", region_name=REGION_NAME).Table(AUDIT_TABLE_NAME)
25+
self._batch_audit_table = get_dynamodb_table(AUDIT_TABLE_NAME)
2626

2727
def is_duplicate_file(self, file_key: str) -> bool:
2828
matching_files = self._batch_audit_table.query(

0 commit comments

Comments
 (0)