Describe the feature
I'd like a typescript type that accepts common properties I might like to pass to services like S3ClientConfig, EC2ClientConfig, etc.
Use Case
I have a lot of libraries that accept an awsConfig to pass to a variety of different clients they construct and use. Often I'll use something like Omit<S3ClientConfig, 'extensions'> but obviously that's not perfect, and lately it's becoming less and less assignable to config types for other services.
Having to pass in a separate config for each client type to these libraries would be a waste of time. It's mostly just credentials and region I need to pass to everything, but there are a lot of other common things like maxRetries config that would be nice to control from there so I just want a utility type with everything that's broadly applicable. There are even some properties like logger that don't seem to be part of any common interface even though they're duplicated on all the client config types.
Proposed Solution
Maybe an interface with the properties in https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/migrate-client-constructors.html exported from @aws-sdk/types?
Other Information
A Google search for "aws node sdk v3 typescript type for config props common to all services" yielded an AI response that seems to be hallucinated:
In the AWS SDK for JavaScript v3, the common configuration properties across all services are defined in the ClientConfig type. This type is available via the @aws-sdk/types package or, more commonly, is an inherited type within the specific client configuration objects (e.g., S3ClientConfig, DynamoDBClientConfig).
Acknowledgements
SDK version used
3.973.1
Environment details (OS name and version, etc.)
N/A
Describe the feature
I'd like a typescript type that accepts common properties I might like to pass to services like
S3ClientConfig,EC2ClientConfig, etc.Use Case
I have a lot of libraries that accept an
awsConfigto pass to a variety of different clients they construct and use. Often I'll use something likeOmit<S3ClientConfig, 'extensions'>but obviously that's not perfect, and lately it's becoming less and less assignable to config types for other services.Having to pass in a separate config for each client type to these libraries would be a waste of time. It's mostly just
credentialsandregionI need to pass to everything, but there are a lot of other common things likemaxRetriesconfig that would be nice to control from there so I just want a utility type with everything that's broadly applicable. There are even some properties likeloggerthat don't seem to be part of any common interface even though they're duplicated on all the client config types.Proposed Solution
Maybe an interface with the properties in https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/migrate-client-constructors.html exported from
@aws-sdk/types?Other Information
A Google search for "aws node sdk v3 typescript type for config props common to all services" yielded an AI response that seems to be hallucinated:
Acknowledgements
SDK version used
3.973.1
Environment details (OS name and version, etc.)
N/A