aws-sdk-ruby: DynamoDB #query method returns response with items = nil

Describe the bug

Initial issue (https://github.com/Dynamoid/dynamoid/issues/516) was reported in Dynamoid project. It seems the #query (link) method may return sometimes response with #items equal nil.

Expected Behavior

I would expect QueryOutput#items to return Array of items or at least an empty Array if there are no items to fetch as the documentation states.

https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/DynamoDB/Client.html#query-instance_method

Current Behavior

QueryOutput#items returns nil

Reproduction Steps

There is no way to constantly reproduce the issue. The issue is being reproduced occasionally.

Possible Solution

No response

Additional Information/Context

A GSI is used in the query

Gem name (‘aws-sdk’, ‘aws-sdk-resources’ or service gems like ‘aws-sdk-s3’) and its version

aws-sdk-dynamodb 1.80.0

Environment details (Version of Ruby, OS environment)

Ruby 3.0

About this issue

  • Original URL
  • State: closed
  • Created 9 months ago
  • Comments: 18 (9 by maintainers)

Most upvoted comments

Wow! Thanks. We will forward this request Id to the DynamoDB team and have them investigate. This is either an undocumented behavior or just a bug (probably the latter).

Thank you! I will close the issue for now.

No, there is no proxy.