This project demonstrates how to upload files from AWS S3 to Google Drive using AWS Lambda. Before getting started, ensure that you have the credentials.json from Google Cloud Console and the necessary permissions set up for S3 and Lambda.
Download the code as a ZIP file and unzip it.
Open first_pickle.py
and replace the value of CREDENTIALS_FILE
with the path of your credentials.json file.
cd lambda_s3-put_to_google-drive-master
pip install -r requirements.txt -t .
python3 first_pickle.py
This will open a Google Drive login popup. Complete the login process.
After logging in, token.pickle will be generated in the same directory.
Open lambda_function.py
and replace the value of SHARED_DRIVE_ID
with the folder ID of your Google Drive where you want to upload files.
cd lambda_s3-put_to_google-drive-master
pip install -r requirements.txt -t .
zip -r ../my_lambda.zip .