diff --git a/src/glue/jobs/json_to_parquet.py b/src/glue/jobs/json_to_parquet.py index 02fbd877..32259278 100644 --- a/src/glue/jobs/json_to_parquet.py +++ b/src/glue/jobs/json_to_parquet.py @@ -361,7 +361,7 @@ def archive_existing_datasets( if delete_upon_completion and archived_objects: deleted_response = s3_client.delete_objects( Bucket=bucket, - Delete={"Objects": {"Key": obj["Key"] for obj in archived_objects}} + Delete=[obj["Key"] for obj in archived_objects] ) return archived_objects diff --git a/tests/test_json_to_parquet.py b/tests/test_json_to_parquet.py index 3ca064bb..434839a4 100644 --- a/tests/test_json_to_parquet.py +++ b/tests/test_json_to_parquet.py @@ -926,7 +926,7 @@ def test_archive_existing_datasets_delete( ) mock_client.delete_objects.assert_called_once_with( Bucket=artifact_bucket, - Delete={"Objects": {"Key": obj["Key"] for obj in archived_objects}} + Delete=[obj["Key"] for obj in archived_objects] ) def test_drop_deleted_healthkit_data(