Maintenance: deprecate customConfigService and ConfigServiceInterface
Summary
When we replaced EnvironmentVariablesService with the functional env helpers (#4146, #4168, #4188, #4225, #4251, #4314) we removed the implementation but never marked the public seam it sat behind. customConfigService and ConfigServiceInterface are still present and still honoured, with no @deprecated tag, so nothing tells users the option is on its way out.
Why is this needed?
The config service will be removed in a future release and users shouldn't be relying on it. It appears nowhere in docs/ or examples/, so the @deprecated tag in the API reference is the only signal a user will ever get.
Which area does this relate to?
Commons, Logger, Metrics, Tracer, Idempotency
Solution
Markers only, no behaviour change:
@deprecatedonConfigServiceInterfaceincommons/src/types/ConfigServiceInterface.tsand the logger, metrics and tracer variants.@deprecatedon thecustomConfigServiceoption inlogger/src/types/Logger.ts:102,metrics/src/types/Metrics.ts:46andtracer/src/types/Tracer.ts:29, pointing users at constructor options and thePOWERTOOLS_*environment variables instead.- Delete
packages/idempotency/src/types/ConfigServiceInterface.ts, unreferenced since #4314.
Acknowledgment
- [x] This request meets Powertools for AWS Lambda (TypeScript) Tenets
- [ ] Should this be considered in other Powertools for AWS Lambda languages? i.e. Python, Java, and .NET
Future readers
Please react with 👍 and your use case to help us understand customer demand.
Sure, let’s mark the public seam it sits behind 🤣
Jokes aside, yes good catch - let’s mark it as deprecated.
Hi @svozza, I’d like to work on this fix. Could you assign it to me? Thanks!
[!warning] This issue is now closed. Please be mindful that future comments are hard for our team to see. If you need more assistance, please either reopen the issue, or open a new issue referencing this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
Perfect, done!