- Newest
- Most votes
- Most comments
Hi,
What you are trying to achieve is not currently possible in a single operation with DynamoDB, as ConditionExpression is not a read operation, its a write operation. As you have blocked this user from UpdateItem on that attribute, they will be unable to do a conditional check on it. You would need to read the item first, making your assertion on the client side before updating.
Let me know if you would like me to raise a Feature Request with the team for this functionality.
Hi Leeroy, many thanks for the quick reply. That makes sense, although I do think that Condition Expression should be treated as a "read" operation even when it's part of a "Write" operation. So yes, please do raise a feature request - and if you can, I'd be grateful if you could let me know how I could keep track of whether that functionality is going to be included! In the meantime I'll find a way around this by doing a "read" first, but ideally I'd be able to do it all as part of the same request. Thanks!
I can raise the FR for you, consider that done. But unfortunately there is no way to track requests. Rest assured the team implement requests based on demand and customer needs.
You can keep up with the latest feature releases on the AWS Portal https://aws.amazon.com/new/
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated 6 months ago

hi there. I can't get my UpdateItem to work on a single attribute like you. Can you show me your policy please? here's mine:
{ "Version": "2012-10-17", "Statement": [ { "Sid": "AllowUpdateTechnicianIDsOnly", "Effect": "Allow", "Action": "dynamodb:UpdateItem", "Resource": "arn:aws:dynamodb:::table/[table-name]", "Condition": { "ForAllValues:StringEqualsIfExists": { "dynamodb:Attributes": [ "technician_ids" ] } } } ] }
this gets rejected when I try to just set the attribute/column I'm allowing