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

后端 未结 15 494
南旧
南旧 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:31

    For ppl who are still facing this issue, try adding s3_host as follows to the config hash

       :storage => :s3,
       :s3_credentials => {:access_key_id => access key,
       :secret_access_key => secret access key},
       :bucket => bucket name here,
       :s3_host_name => s3-us-west-1.amazonaws.com or whatever comes as per your region}.
    

    This fixed the issue for me.

提交回复
热议问题