Skip to content

[Feature Request] typescript type for common config properties to use with a variety of different clients #7721

Description

@jedwards1211

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

  • I may be able to implement this feature request
  • This feature might incur a breaking change

SDK version used

3.973.1

Environment details (OS name and version, etc.)

N/A

Metadata

Metadata

Assignees

Labels

feature-requestNew feature or enhancement. May require GitHub community feedback.guidanceGeneral information and guidance, answers to FAQs, or recommended best practices/resources.p2This is a standard priority issue

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions