diff --git a/infrastructure/stacks/postcode_etl/functions/uec-sf-postcode-insert/postcode_insert.py b/infrastructure/stacks/postcode_etl/functions/uec-sf-postcode-insert/postcode_insert.py index c7b6e33c..8381cc2a 100644 --- a/infrastructure/stacks/postcode_etl/functions/uec-sf-postcode-insert/postcode_insert.py +++ b/infrastructure/stacks/postcode_etl/functions/uec-sf-postcode-insert/postcode_insert.py @@ -28,7 +28,9 @@ def read_csv_files(): # delete the previously processed files so we have a clean workspace bucket.objects.filter(Prefix=PROCESSED_FOLDER).delete() # run the process for the first 8 files and this is due to the lambda timeout - postcode_location_csv_files = bucket.objects.filter(Prefix=INPUT_FOLDER, Delimiter="/")[:8] + postcode_location_csv_files = list(bucket.objects.filter(Prefix=INPUT_FOLDER, Delimiter="/"))[:8] + print(postcode_location_csv_files) + for postcode_location_csv_file in postcode_location_csv_files: name = postcode_location_csv_file.key