Description
Summary
In #1577, #1575, and #1567 we have added logic that appends a user agent to AWS SDK requests by leveraging the middleware stack of the AWS SDK v3. The current setup however does not take in account the fact that customers might pass us the same client more than once (i.e. create a client > instrument it with Tracer > pass it to Parameters / Idempotency).
Why is this needed?
The current implementation will log a warning that informs the user that Powertools was not able to apply the middleware, this could be misleading.
Which area does this relate to?
Other
Solution
We should make sure that this case is handled correctly by either: 1/ making the operation idempotent (like the X-Ray SDK itself does when instrumenting), 2/ appending the second user agent (like suggested here), 3/ converting operation to a no-op if the middleware is already there.
Acknowledgment
- 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.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status