Open noah-paige opened 1 year ago
Hi @noah-paige, I am validating this feature against the data.all V2 code in main-v2
. Let's see, we have the following boto3 wrappers:
In base
iam
---> NO REGION in clientparameter_store
--> client defined with regionquicksight
--> client defined with regionsecrets_manager
--> client defined with regionsqs
--> client defined with region (from environment vars)sts
--> client defined with region (from environment vars)sts
: in cdk_cli_wrapper, in cdkproxy/main
They both use the regional endpoint (and in other places for deployment)In core
cognito
--> client defined with regioncloudformation
--> client defined with regioncloudwatch
---> NO REGION in client, client definition scattered in the methods (no problem as it is the same region as api calls that use the class)ecs
---> NO REGION in client, client definition scattered in the methods (no problem as it is the same region as api calls that use the class)
Is your idea related to a problem? Please describe. For api requests to AWS global services we sometimes need to point to the specific regional endpoint if we want communication to navigate via PrivateLink (e.g. STS). There is redundancy in defining this STS client in multiple areas of the codebase passing the specific regional endpoint to communicate with.
Describe the solution you'd like Create either a client factory to handle setting up the AWS service client to communicate with the regional endpoint for said services and/or use environment variables to use regional endpoints as default behavior.
P.S. Don't attach files. Please, prefer add code snippets directly in the message body.