Add helper function for DynamoDB scan