public static ScanResponse scan(final DynamoDbClient dynamoDbClient,
                                    final String tableName,
                                    final String filterExpression,
                                    final Map<String, String> expressionAttributeName,
                                    final Map<String, AttributeValue> expressionValues) {
        return FunctionUtils.doAndHandle(() -> {
            val scanRequest = ScanRequest.builder()
                .tableName(tableName)
                .filterExpression(filterExpression)
                .expressionAttributeValues(expressionValues)
                .expressionAttributeNames(expressionAttributeName)
                .build();
            LOGGER.debug("Submitting request [{}] to get record with expression filters [{}]", scanRequest, filterExpression);
            return dynamoDbClient.scan(scanRequest);
        }, e -> ScanResponse.builder().items(Map.of()).build()).get();
    }
Scan via filter expressions and respond.

@param dynamoDbClient          the dynamo db client
@param tableName               the table name
@param filterExpression        the filter expression
@param expressionAttributeName the expression attribute name
@param expressionValues        the expression values
@return the scan response
support/cas-server-support-dynamodb-core/src/main/java/org/apereo/cas/dynamodb/DynamoDbTableUtils.java