AWS S3 分段上传失败,即使在 s3:* 权限之后访问也被拒绝
我有一个 2 GB 的文件,正在使用 boto3 s3.upload_fileobj 上传。在分段上传期间,PUT 调用成功,但 DELETE 调用失败,并出现下面提到的错误。我已向 IAM 角色授予 s3:* 权限。请针对此问题提出修复或解决方法。
错误:
*https://mybucket.s3.amazonaws.com:443< /a> "DELETE"
调用 UploadPart 操作时发生错误(访问被拒绝):访问被拒绝*
import boto3
s3 = boto3.client('s3')
extra_args = {"ServerSideEncryption" : "AES256"}
with open('filename', 'rb') as data:
s3.upload_fileobj(data, 'mybucket', 'mykey',ExtraArgs=extra_args)
请注意,对于小文件,此代码工作正常。提前致谢!
I have a 2 GB file which I am uploading using boto3 s3.upload_fileobj. During multipart upload PUT calls are successful but DELETE call fails with error mentioned below. I have given s3:* permission to IAM Role. Please suggest a fix or workaround for this issue.
Error:
*https://mybucket.s3.amazonaws.com:443 "DELETE"
An error occurred(Access Denied) while calling the UploadPart Operation: Access Denied*
import boto3
s3 = boto3.client('s3')
extra_args = {"ServerSideEncryption" : "AES256"}
with open('filename', 'rb') as data:
s3.upload_fileobj(data, 'mybucket', 'mykey',ExtraArgs=extra_args)
Please note that, for small files this code is working fine. Thanks in Advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论