2121 ACK_PREFIX ,
2222 FILE_NAME_VAL_ERROR ,
2323 HEADER_RESPONSE_CODE_COLUMN ,
24- ActionFlag ,
25- Operation ,
2624 RAVS_URI ,
2725)
2826
27+
2928def upload_file_to_s3 (file_name , bucket , prefix ):
3029 """Upload the given file to the specified bucket under the provided prefix.
3130 Returns the S3 key if successful, or raises an exception."""
@@ -273,7 +272,7 @@ def fetch_pk_and_operation_from_dynamodb(identifier_pk):
273272 Logs any exceptions encountered during the DynamoDB query.
274273 """
275274 try :
276- response = table .query (
275+ response = events_table .query (
277276 IndexName = "IdentifierGSI" ,
278277 KeyConditionExpression = "IdentifierPK = :identifier_pk" ,
279278 ExpressionAttributeValues = {":identifier_pk" : identifier_pk },
@@ -391,6 +390,7 @@ def verify_final_ack_file(file_key):
391390 )
392391 return True
393392
393+
394394def delete_filename_from_audit_table (filename ) -> bool :
395395
396396 # 1. Query the GSI to get all items with the given filename
@@ -409,6 +409,7 @@ def delete_filename_from_audit_table(filename) -> bool:
409409 logger .error (f"Error deleting from audit table: { e } " )
410410 return False
411411
412+
412413def delete_filename_from_events_table (identifier ) -> bool :
413414
414415 # 1. Query the GSI to get all items with the given filename
@@ -428,6 +429,7 @@ def delete_filename_from_events_table(identifier) -> bool:
428429 logger .warning (f"Error deleting from events table: { e } " )
429430 return False
430431
432+
431433def poll_s3_file_pattern (prefix , search_pattern ):
432434 """Poll the ACK_BUCKET for an ack file that contains the input_file_name as a substring."""
433435
0 commit comments