@Override
    public SamlIdPMetadataDocument fetchInternal(final Optional<SamlRegisteredService> registeredService) {
        val appliesTo = getAppliesToFor(registeredService);
        val query = List.of(
            DynamoDbQueryBuilder.builder()
                .key(SamlIdPMetadataColumns.APPLIES_TO.getColumnName())
                .attributeValue(List.of(AttributeValue.builder().s(appliesTo).build()))
                .operator(ComparisonOperator.EQ)
                .build());
        return getRecordsByKeys(query).findFirst().orElse(null);
    }
This is {@link DynamoDbSamlIdPMetadataLocator}.

@author Misagh Moayyed
@since 7.2.0
support/cas-server-support-saml-idp-metadata-dynamodb/src/main/java/org/apereo/cas/support/saml/idp/metadata/DynamoDbSamlIdPMetadataLocator.java