-
Notifications
You must be signed in to change notification settings - Fork 403
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
feat(parameters): Allow settings boto3.client() arguments #1079
Comments
Thanks for opening your first issue here! We'll come back to you as soon as we can. |
It would be even more amazing if we could go one step further and allow to set these endpoint URLs via environment variables, so that I could use VPC endpoints with no code modification. |
Hey, to my understanding this is already supported. |
The former only allows me to pass arguments to the client's methods, and the latter allows me to modify the session, but none of these allow me to modify the client initialization. |
look at the appconfig example config is sent to the client initalization and points it to a specific region. |
Right, but the |
@ran-isenberg can you confirm that I'm not missing anything here? |
@gshpychka I'm not familiar with this field BUT to my understand, unless you can set it via the config param: I think you are right. |
Yes, exactly. As stated in the issue description, I'm using VPC endpoints with private DNS disabled, so I have to pass endpoint_url to boto3.client to use the endpoint-specific host name. |
@heitorlessa I think we should allow people to send qwargs to the init function, not just config. |
Thanks everyone! The more I look into the Parameters utility the more I find we should've accepted a whole boto Client only. It would simplify our logic to maintain it, and also make it easier for customers to stub for unit testing, use snapshot testing with placebo, or in this case pass a different endpoint_url. We won't be able to add this now due to our pause and bandwidth. I do believe there are other customers who will eventually be blocked by this too, so if anyone could create a PR to accept a Client I'll happily work with you to get it merged as an exception. Note: I'm following this issue for boto to eventually add support to |
@heitorlessa A boto client in addition to the session or instead? |
It’d have to be in addition to not break customers using the boto3_session
argument. If they pass a session, we create a client from it. If they pass
a client, we use that instead.
…On Tue, 5 Apr 2022 at 11:37, Ran Isenberg ***@***.***> wrote:
@heitorlessa <https://github.com/heitorlessa> A boto client in addition
to the session or instead?
—
Reply to this email directly, view it on GitHub
<#1079 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZPQBBXCOAXVQ4RSFYBHZ3VDQCWVANCNFSM5Q7X65TQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@heitorlessa FYI #1096 |
Releasing it first thing tomorrow morning @gshpychka |
This is now released under 1.26.0 version! |
@gshpychka this is available on PyPi and SAR already - a new Lambda Layer will be available in a few hours. Docs are here: https://awslabs.github.io/aws-lambda-powertools-python/latest/utilities/parameters/#bring-your-own-boto-client Please do feel free to reopen if this has not solved your problem. We took liberty to add for others to address a related testing challenge with Parameters too. |
Is your feature request related to a problem? Please describe.
I'm using VPC endpoints with private DNS disabled, so I have to pass
endpoint_url
toboto3.client
to use the endpoint-specific host name. I am not able to useparameters
because this is not supported.Describe the solution you'd like
Perhaps allowing to pass additional keyword arguments to the
client
method.The text was updated successfully, but these errors were encountered: