-
Notifications
You must be signed in to change notification settings - Fork 55
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
BatchWriter attempts to re-encrypt unprocessed items. #91
Comments
Thanks for reporting this. It looks like this is caused by the intersection between the boto3 We look for the reserved attributes to attempt to keep the user from accidentally using those attributes for other things or re-encrypting items (exactly what is happening here). I think that a reasonable balance here might be to add a check into the [1] https://github.com/boto/boto3/blob/develop/boto3/dynamodb/table.py#L133-L147 |
We will be addressing this in #92 |
Hey @mattsb42-aws any idea when this might get into an official release? |
Hi @woodyza. Sorry, this fell through the cracks. Since this changes the API behavior, this is going to need to be a minor-version change. Because of that I had wanted to get the change to address #90 in that release as well, but have had other things that kept taking priority. However, after taking another look through #90, I realize now that we cannot process that silently like we could the batch operations (detailed update in that issue). I have a couple minor linting issues that I need to address (pylint update, I think), but after that we should be good to publish. I'll update here once a new version is pushed. |
All good, thanks for the update! 👍 |
@woodyza |
Great stuff, thank you! |
Using the current 1.0.5 packaged version of the code the BatchWriter returned by Table.batch_writer() will raise exceptions if there are any unprocessed items returned from a batch_write.
The cause appears to be the client re-encrypting the already encrypted unprocessed items that get returned, and in the process validating the attribute names against the reserved attributes which fails.
Replicating this is easy enough, use a client to put items into a table at a rate that causes the writes to be throttled. Once at least one item fails and gets returned as an unprocessed item it'll trigger that error.
The text was updated successfully, but these errors were encountered: