Add first class for new configuration system #599
+795
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a configuration system for AWS clients that solves the challenge of managing configuration from multiple sources while maintaining proper precedence, validation, and auditability. AWS SDKs need to handle configuration from constructor parameters, environment variables, config files, and credentials files with a well-defined precedence order, while also tracking where each value originated for debugging and complex resolution logic.
The implementation provides async configuration resolution to handle file I/O operations, comprehensive type validation that works around Python's protocol type limitations, and extensible custom validation for complex types like endpoint URIs. Each configuration value is wrapped with source metadata, enabling users to understand where a particular value came from.
The system is designed to be easily extensible for new configuration fields while maintaining type safety and IDE support. It handles the complexity of AWS configuration requirements while providing a clean interface for client initialization and runtime configuration access.