Credentials refreshed with every api request #3096
-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
@mikescandy Just out of curiosity, are you using DynamoDB local or non-AWS service like simulation (like localstack) by any chance locally for testing the above code for memory profiling? Looking at the logic for AWS4Signer.DetermineSigningRegion(), there is a code comment which states that Thanks, |
Beta Was this translation helpful? Give feedback.
-
Are you creating the service client for every request? The https://github.com/aws/aws-sdk-net/blob/main/sdk/src/Core/Amazon.Runtime/ClientConfig.cs#L259 |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick reply! |
Beta Was this translation helpful? Give feedback.
Are you creating the service client for every request? The
ServiceUrl
property in your call stack caches the result of the property for subsequent calls. But if you are creating new service clients for every request the cache results will be lost.https://github.com/aws/aws-sdk-net/blob/main/sdk/src/Core/Amazon.Runtime/ClientConfig.cs#L259