-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A way to add custom HTTP headers to S3 calls #2889
Comments
Hi @arainchik, Thanks for the feature request! Would you mind elaborating on what your particular use case would be for this? |
There are multiple uses for this kind of feature. One example would be to pass special authentication token in HTTP headers to HTTPS proxy. |
Hi @arainchik, Thanks for clarifying! I'll pass this along to the team. |
Hi @stobrien89 |
Hi @andyalbert, My apologies for the delay. Let me double-check with the team that we'll accept a change like this before you put in the effort. I'll probably have an update sometime next week. |
Hi all, Just to confirm, the main issue here is that you're unable to dynamically pass headers to the event system, correct? |
@stobrien89 you are correct, there is no way to pass custom data to event handlers, currently we have to do it in a non-pythonic way using global variables/queues. |
Found possible solution from https://stackoverflow.com/questions/58828800/adding-custom-headers-to-all-boto3-requests
|
It works, but as I mintioned earlier: there is no way to pass custom data to event handlers, currently we have to do it in a non-pythonic way using global variables/queues. |
Hi all, closing this in favor of a duplicate opened at botocore: |
|
Is your feature request related to a problem? Please describe.
We need a way to add custom HTTP headers to S3 calls without using global variables
Describe the solution you'd like
Current implementation allows you to add custom HTTP headers using event system as described in #2251 but it does not allow you to pass headers from the application making such calls. The only possible way I see right now is to use global variables, which is not a good practice.
My suggestion is to add new parameter CustomHTTPHeaders for S3 calls in boto, which will be passed to S3 target.
An example would be:
The text was updated successfully, but these errors were encountered: