I have two API calls to the BE that are fired simultaneously. Both access the same record in a DynamoDb table.
90% of the time, there is no issue.
10% of the time, I get the following error:
pynamodb.exceptions.QueryError: Failed to query items: An error occurred (AccessDeniedException) on request (KKTVJ3GL22G1053VDGJM3U4T17VV4KQNSO5AEMVJF66Q9ASUAAJG) on table (account_entity_links) when calling the Query operation
This clearly does not have anything to do with permissions. My intuition tells me this has to do with the "almost" simultaneous access.
Is there any restrictions in DynamoDB with two calls accessing a record simultaneously?
No.
The AWS docs mention
I don't know anything about pynamnodb, but you might check to see if there's a newer version than what you're currently using.