Error “Read-only file system” in AWS Lambda when downloading a file from S3 September 25, 2022 by Tarik Billa Only /tmp seems to be writable in AWS Lambda. Therefore this would work: filepath="/tmp/" + key References: https://aws.amazon.com/blogs/compute/choosing-between-aws-lambda-data-storage-options-in-web-apps https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html More Related Contents: How to write a file or data to an S3 object using boto3 Boto3 to download all files from a S3 Bucket How to import a text file on AWS S3 into pandas without writing to disk Save Dataframe to csv directly to s3 Python Read file content from S3 bucket with boto3 check if a key exists in a bucket in s3 using boto3 Listing contents of a bucket with boto3 Retrieving subfolders names in S3 bucket from boto3 How to upload File in FastAPI, then to Amazon S3 and finally process it? Can I use boto3 anonymously? Pandas in AWS lambda gives numpy error Getting S3 objects’ last modified datetimes with boto How to specify credentials when connecting to boto3 S3? Open S3 object as a string with Boto3 how to copy s3 object from one bucket to another using python boto3 How to return a PDF file from in-memory buffer using FastAPI? Reading an JSON file from S3 using Python boto3 Download a folder from S3 using Boto3 Using moviepy, scipy and numpy in amazon lambda Use AWS Glue Python with NumPy and Pandas Python Packages How to upload a file to directory in S3 bucket using boto Complete scan of dynamoDb with boto3 How to handle errors with boto3? How to set-up a Django project with django-storages and Amazon S3, but with different folders for static files and media files? How to choose an AWS profile when using boto3 to connect to CloudFront How to read a list of parquet files from S3 as a pandas dataframe using pyarrow? AWS Content Type Settings in S3 Using Boto3 Move files between two AWS S3 buckets using boto3 Import libraries in lambda layers Tesseract OCR on AWS Lambda via virtualenv