Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Tableau
  3. Question
Tableau

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

Asked by Wanda May Jul 19, 2021 2.9K views 1 answer
Share

About this question

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(picture)
    Aws.config = {
        :access_key_id => ENV["AWS_ACCESS_KEY_ID"],
        :secret_access_key => ENV["AWS_SECRET_ACCESS_KEY"],
        :region => 'us-west-2'
    }
    s3 = Aws::S3::Client.new
    test = s3.get_object(
        :bucket => ENV["AWS_S3_BUCKET"],
        :key => picture.image_url.split('/')[-2],   
    )
end

However, I am getting the following error:

The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.

I know the region is correct because if I change it to us-east-1, the following error shows up:

The specified key does not exist.

What am I doing wrong here?

Your answer

1 Answer

More Tableau discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Tableau Blogs

Guides, tips and career advice on Tableau from JanBask experts.