Although there is no such thing as OR , AND , you can still simulate SQL queries using scan and filterexpression .
But remember that if you use a scan, this means that the entire table will be extracted and then processed, and the scan does not always scan the entire table in one iteration. so you can skip some items. therefore, this method is usually avoided because it is very expensive. but here is a piece of python3 code using boto3 api that can mimic the requested sql query.
response = table.scan( FilterExpression=Attr('fname').eq('xxxxx') | Attr('lname').eq('xxxxx'))
filterexpression also different operators like &, ~
source share