Python AWS Boto3: How to read files from S3 bucket?


Using Boto3, the python script downloads files from an S3 bucket to read them and write the contents of the downloaded files to a file called blank_file.txt.

My question is, how would it work the same way once the script gets on an AWS Lambda function?


Lambda provides 512 MB of /tmp space. You can use that mount point to store the downloaded S3 files or to create new ones.

The working directory used by Lambda is /var/task and it is a read-only filesystem. You will not be able to create files in it.

Leave a Reply