运行 aws s3 可以与 boto3 同步吗?

Is it possible to run aws s3 sync with boto3?

AWS CLI 提供 aws s3 sync 命令在 2 个位置之间同步数据。

boto3中是否有等效的命令?

我在boto3 documentation中找不到这种命令。

Boto3 不包含 s3 同步功能。这只能通过 AWS CLI 工具获得。

有趣的是,boto's github 有一个未解决的问题可以追溯到...2015 年。

我猜你最好的选择是从 Python 脚本中 运行 aws s3 sync

这里是

或者,您可能想探索 DataSync client