AWS S3: The bucket you are attempting to access must be addressed using the specified endpoint

后端 未结 15 452
南旧
南旧 2020-12-02 10:33

I am trying to delete uploaded image files with the AWS-SDK-Core Ruby Gem.

I have the following code:

require \'aws-sdk-core\'

def pull_picture(pict         


        
15条回答
  •  离开以前
    2020-12-02 11:27

    I was facing a similar error because the bucket was in region us-west-2 and the URL pattern had bucketname in the path. Once, I changed the URL pattern to have bucketname as URL subdomain to grab the files and it worked.

    For eg previous URL was

    https://s3.amazonaws.com/bucketname/filePath/filename
    

    Then I replaced it as

    https://bucketname.s3.amazonaws.com/filePath/filename
    

提交回复
热议问题