If you rescue that error, you can inspect the HTTP response body:
begin resp = client.list_objects( bucket: 'my-backup’) rescue Aws::S3::Errors:: PermanentRedirect => error puts error.context.http_response.body.read end
My guess is the bucket you are addressing is not in the ‘us-west-2’ region. You can call
#get_bucket_location to determine the actual region.
I've considered guessing, but this proved problematic, as it is not possible to know if the 404 is a result of a no such bucket or no such key.
We need to change this in the docs to reflect the SDK will raise a NotFound.
@sirmxanot In the “Parameters” section of the
#wait_until method you linked documentaiton for, it indicates that the accepted waiter names and the operations they call are specified in the
#waiter_names method. It is linked from there. In the
#waiter_names method, it shows the API call being pulled and links to that:
Aws.service()or is there more to it? I am driving some operations that definitely need waiters and I would rather get them into the SDK than implement the semantics myself by hand.
Aws::Waiters::Errors::NoSuchWaiterError: no such waiter :instance_profile_available; valid waiter names are:no matter what. Link: harvard-dce/aws-sdk-ruby@bd9510c