Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Invoke S3 sync from a Python lambda with boto3

This is a follow-up to an earlier question I had. If possible, instead of calling the AWS CLI from a Python lambda, I'd like to use Boto3 (which has S3 capabilities). However, I don't see any sync functionality in the Boto3 S3 documentation (I expected it to be under Bucket or BucketLifecycle but I checked everywhere as well).

Is it possible then to invoke S3 sync from Boto?

like image 796
wishihadabettername Avatar asked Mar 05 '23 17:03

wishihadabettername


1 Answers

Boto3 does not include s3 sync capabilities. That is only available via the AWS CLI tool. You can package the AWS CLI tool with your Python Lambda function by following the steps outlined in this answer.

like image 52
Mark B Avatar answered Apr 08 '23 14:04

Mark B