From aec8458a3d0104828788f182c893be25aa5ee496 Mon Sep 17 00:00:00 2001 From: Michael Hall Date: Fri, 1 Dec 2023 15:25:38 -0600 Subject: [PATCH] - Actually getting the key now. --- src_py/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src_py/main.py b/src_py/main.py index 2a29bcd..a370eb5 100644 --- a/src_py/main.py +++ b/src_py/main.py @@ -48,14 +48,14 @@ def scan_ed_pub(s3_client): def handle_s3_event_message(event, s3_client): - object_key = event.get('Records')[0].get('s3').get('object') + object_key = event.get('Records')[0].get('s3').get('object').get('key') s3_client.copy_object( Bucket=destination_bucket, CopySource={ 'Bucket': source_bucket, 'Key': object_key }, - Key=object_key.get('key').split('/', 2)[-1] + Key=object_key.split('/', 2)[-1] )