Amazon S3:由于"无法移动文档;对此对象的所有访问权限已被禁用"

时间:2016-03-21 19:59:08

标签: ruby-on-rails ruby amazon-web-services amazon-s3

我使用这段代码几周了,

config = {region: 'us-east-1',
          bucket: AWS_S3_CONFIG['bucket'],
          key:    AWS_S3_CONFIG['access_key_id'],
          secret: AWS_S3_CONFIG['secret_access_key']}
    Aws.config.update({region: config[:region], 
                       credentials: Aws::Credentials.new(config[:key], config[:secret]),
                       s3: { region: config[:region] }})

    bucket = Aws::S3::Resource.new.bucket(config[:bucket])

    object = bucket.object("document/#{document.user_id}/#{document.filename}")
    object.copy_from("#{config[:region]}/documents_temp/#{document.filename}", acl:'public-read')

    document.update_attribute(:file_s3_url, object.public_url)

但是今天早上当我试图在我们的系统(和存储桶)中移动文档时,我发现了一个错误:

All access to this object has been disabled

我没有更改应用中的任何内容,亚马逊AWS设置中的任何内容,只显示此错误。

这里发生了什么?我很难确定问题。

任何帮助表示感谢。

非常感谢

0 个答案:

没有答案
相关问题