I am using an AWS lambda function to download a file to my /tmp folder.
try:
s3.download_file(source_bucket_name, i, f"/tmp/{original_zip_file_name}")
except Exception as e:
print('Unable to download S3 file', e)
sys.exit(1)
The behavior is a bit inconsistent. How can I use Python to now list down the files present in my tmp folder after this?
Edit:
I mean, how can I list down the contents of tmp immediately after this code snippet, within the same lambda function (not after the lambda function ends).
because later I am reading those files from tmp again