How to Upload File to S3 using Python AWS Lambda
Published in
5 min readMar 5, 2022
In this short post, I will show you how to upload file to AWS S3 using AWS Lambda. We will use Python’s boto3
library to upload the file to the bucket. Once the file is uploaded to S3, we will generate a pre-signed GET URL and return it to the client.
If you are looking to upload images to S3 using a React Native app, refer to this article.
If you are looking to upload images to S3 directly using NextJS then refer to this article.
Step 0: Create a project directory
First of all, create a project directory for your lambda function and its dependencies.
mkdir my-lambda-function