Closed mrunal-pp closed 11 months ago
Hi @mrunal-patekar-discovery ,
Thanks for reaching out. This is indeed an odd behavior. Since you didn't include your actual application code its hard to speculate, but there are two errors in there. One suggested that the context (usually set by the user) has timed out. Are you setting a context timeout when creating your config object?
Something like:
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) // timeout here might be too short?
defer cancel()
cfg, err := config.LoadDefaultConfig(ctx, config.WithRegion("us-east-1"))
if err != nil {
log.Fatalf("unable to load SDK config, %v", err)
}
The other error points a deserialization error. This usually indicates the SDK expected a response in a certain format and received some other response instead. You can also enable the raw request and response logger to see if the service responds with a problematic body that causes the SDK deserialization logic to throw an error:
cfg, err := config.LoadDefaultConfig(ctx, config.WithRegion("us-east-1"), config.WithClientLogMode(aws.LogRequestWithBody|aws.LogResponseWithBody))
if err != nil {
log.Fatalf("unable to load SDK config, %v", err)
}
If you can share your code, and those output logs with us (please redact any sensitive info like credential info) that would help diagnose the problem.
Thanks again, Ran~
This issue has not received a response in 1 week. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled.
Describe the bug
Our service makes
DynamoDB scan requests
periodically and the error we encounter looks like this:The amount of records in the Dyanmo DB table is less than 100, and the DynamoDB query fired has a limit of 100. The object returned is a list of records in the DyanmoDB table and the object is a very complex | nested JSON.
This is a transient error and the issue is not encountered if we make a second request.
We also contacted AWS support to see what kind of logs they see on their side based on the request IDs. They don't have any errors and are getting a 200 status code.
Expected Behavior
The object returned is a list of records in the DyanmoDB table and the object is a very complex | nested JSON. Sample object:
Current Behavior
Our service makes
DynamoDB scan requests
periodically and the error we encounter looks like this:Reproduction Steps
If we make a lot of requests to DynamoDB one after the other, it seems to have encountered the above error.
Possible Solution
No response
Additional Information/Context
No response
AWS Go SDK V2 Module Versions Used
Compiler and Version used
go version go1.20.1 darwin/amd64
Operating System and version
kubernetes cluster