Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SimpleDB gem issues with aws-sdk-core >= 3.192.0 #3012

Closed
dsablic opened this issue Apr 25, 2024 · 4 comments
Closed

SimpleDB gem issues with aws-sdk-core >= 3.192.0 #3012

dsablic opened this issue Apr 25, 2024 · 4 comments
Labels
wontfix We have determined that we will not resolve the issue.

Comments

@dsablic
Copy link

dsablic commented Apr 25, 2024

Describe the bug

Aws::SimpleDB::Client#put_attributes fails with No attributes error
Aws::SimpleDB::Client#batch_put_attributes fails with No items specified error

Expected Behavior

Should not raise an error on a valid API call.

Current Behavior

Raises errors with the methods listed above and probably some others too.

Reproduction Steps

The following code fails with No attributes:

client = Aws::SimpleDB::Client.new
client.create_domain(domain_name: 'test domain')
client.put_attributes(domain_name: 'test_domain', item_name: 'test_item', attributes: [{ name: 'attr1', value: 'value1', replace: true }])

Possible Solution

There seems to be an issue with the parameter serialization in that some parameter names are pluralized where they shouldn't be. Here's a failing batch_put_attributes call wire trace:


<- "POST / HTTP/1.1\r\nAccept-Encoding: \r\nContent-Type: application/x-www-form-urlencoded; charset=utf-8\r\nUser-Agent: aws-sdk-ruby3/3.192.1 ua/2.0 os/macos#23 md/arm64 lang/ruby#3.2.3 md/3.2.3 cfg/retry-mode#legacy\r\nContent-Length: 567\r\nAccept: */*\r\nHost: sdb.amazonaws.com\r\n\r\n"
<- "AWSAccessKeyId=REDACTED&Action=BatchPutAttributes&DomainName=test_domain&Items.1.Attributes.1.Name=attr1&Items.1.Attributes.1.Replace=true&Items.1.Attributes.1.Value=value1&Items.1.Attributes.2.Name=attr2&Items.1.Attributes.2.Replace=true&Items.1.Attributes.2.Value=value2&Items.1.Attributes.3.Name=attr3&Items.1.Attributes.3.Replace=true&Items.1.Attributes.3.Value=value3&Items.1.ItemName=item1&Signature=REDACTED&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2024-04-25T07%3A22%3A59Z&Version=2009-04-15"
-> "HTTP/1.1 400 Bad Request\r\n"
-> "Date: Thu, 25 Apr 2024 07:22:59 GMT\r\n"
-> "Transfer-Encoding: chunked\r\n"
-> "Connection: close\r\n"
-> "Server: Amazon SimpleDB\r\n"
-> "\r\n"
-> "e9\r\n"
reading 233 bytes...
-> "<?xml version=\"1.0\"?>\n<Response><Errors><Error><Code>MissingParameter</Code><Message>No items specified</Message><BoxUsage>0.0000000000</BoxUsage></Error></Errors><RequestID>07e489af-a509-701a-5868-98f99b88ac83</RequestID></Response>"
read 233 bytes
reading 2 bytes...
-> "\r\n"
read 2 bytes
-> "0\r\n"
-> "\r\n


Additional Information/Context

No response

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

aws-sdk-core:3.192.1

Environment details (Version of Ruby, OS environment)

ruby 3.3, MacOS/Linux

@dsablic dsablic added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Apr 25, 2024
@mullermp
Copy link
Contributor

Thanks for opening an issue. In this version of core, we made many fixes to all of the protocol building and parsing logic, and aligned them to proper specification.

Simple DB is extremely deprecated and we do not publish any new versions of that gem. Additionally, it would not make sense to revert any fixes we made to core.

My recommendation would be to pin your core version to the last working version. I would also recommend moving to Dynamo DB!

@mullermp mullermp added wontfix We have determined that we will not resolve the issue. and removed bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Apr 25, 2024
Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

@mullermp
Copy link
Contributor

I have a potential fix for this one #3055

@dsablic
Copy link
Author

dsablic commented Jul 2, 2024

Thanks, but I switched to using DynamoDB as per your recommendation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix We have determined that we will not resolve the issue.
Projects
None yet
Development

No branches or pull requests

2 participants