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

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

    I had same error. It occurred when s3 client was created with different endpoint than the one which was set up while creating bucket.

    • ERROR CODE - The bucket was set up with EAST Region.

    s3Client = New AmazonS3Client(AWS_ACCESS_KEY, AWS_SECRET_KEY, RegionEndpoint.USWest2)

    • FIX

    s3Client = New AmazonS3Client(AWS_ACCESS_KEY, AWS_SECRET_KEY, RegionEndpoint.USEast1)

提交回复
热议问题