You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to be able to do aws s3 cp s3://BUCKET/FILE Y. This calls a GET request to: http://127.0.0.1:5000/BUCKET/FILE. I would like this request to redirect to a s3 presigned url. So the web proxy would return 302 -> PRESIGNED_URL.
However botocore calls urllib3.connectionpool but does not follow the redirect.
:param redirect:
If True, automatically handle redirects (status codes 301, 302,
303, 307, 308). Each redirect counts as a retry. Disabling retries
will disable redirect, too.
Is there a way to change the send function being used? Or have another connection pool to follow redirects?
I also tried to change the httpsession.py code to have Retry(True) but that connection doesn't change url. On Redirect it went from http://127.0.0.1:5000/BUCKET/FILE -> http://127.0.0.1:5000/<REDIRECTION_URL>. This is because it's using a pool for a single host:
class HTTPConnectionPool(ConnectionPool, RequestMethods):
"""
Thread-safe connection pool for one host.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm building a s3 web proxy. I'm trying to integrate it with aws cli.
The cli would be configured with:
I want to be able to do
aws s3 cp s3://BUCKET/FILE Y
. This calls a GET request to:http://127.0.0.1:5000/BUCKET/FILE
. I would like this request to redirect to a s3 presigned url. So the web proxy would return 302 -> PRESIGNED_URL.However botocore calls urllib3.connectionpool but does not follow the redirect.
Digging in the code: https://github.com/boto/botocore/blob/develop/botocore/httpsession.py#L469
This is the call that makes the GET request, but with
Retry(False)
it won't follow any redirect:Is there a way to change the send function being used? Or have another connection pool to follow redirects?
I also tried to change the
httpsession.py
code to haveRetry(True)
but that connection doesn't change url. On Redirect it went fromhttp://127.0.0.1:5000/BUCKET/FILE
->http://127.0.0.1:5000/<REDIRECTION_URL>
. This is because it's using a pool for a single host:Is botocore not supposed to handle any redirect?
Beta Was this translation helpful? Give feedback.
All reactions