Skip to content

Commit 54d2684

Browse files
committed
2 parents 0b2b99d + 126ab2a commit 54d2684

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lasp_opensearch_data_center/constructs/backend_storage.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
aws_s3_notifications as s3_notify,
1111
)
1212

13+
from aws_cdk.aws_s3 import NotificationKeyFilter
14+
1315

1416
class BackendStorageConstruct(Construct):
1517
"""Construct containing standard resources used by the data center back end, including notification mechanisms
@@ -102,7 +104,8 @@ def __init__(
102104
# Send files from dropbox bucket into SQS
103105
self.dropbox_bucket.add_event_notification(
104106
s3.EventType.OBJECT_CREATED,
105-
s3_notify.SqsDestination(self.dropbox_queue)
107+
s3_notify.SqsDestination(self.dropbox_queue),
108+
s3.NotificationKeyFilter(prefix="received_files/")
106109
)
107110

108111
# Create DLQ

0 commit comments

Comments
 (0)