[英]Aws copy data from one S3 bucket to another on same account using lambda python
I am trying to copy data from one S3 bucket to another in same account using lambda python.我正在尝试使用 lambda python 将数据从一个 S3 存储桶复制到同一帐户中的另一个存储桶。 Can anyone help.
任何人都可以帮忙。
Use copy_object()
:使用
copy_object()
:
response = client.copy_object(
Bucket='string',
Key='string',
CopySource='string' or {'Bucket': 'string', 'Key': 'string', 'VersionId': 'string'},
...
)
Specify the destination in Bucket
and Key
, then specify the source in CopySource
.在
Bucket
和Key
中指定目标,然后在CopySource
中指定源。
The easiest format for CopySource
is: source-bucket/folder/foo.txt
CopySource
最简单的格式是: source-bucket/folder/foo.txt
Let us know if you are unfamiliar with writing Lambda functions or using boto3.如果您不熟悉编写 Lambda 函数或使用 boto3,请告诉我们。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.