public boolean delete(final long id, final String principal) {
        val keys = List.of(
            DynamoDbQueryBuilder.builder()
                .key(ColumnNames.PRINCIPAL.getColumnName())
                .attributeValue(List.of(AttributeValue.builder().s(principal).build()))
                .operator(ComparisonOperator.EQ)
                .build(),
            DynamoDbQueryBuilder.builder()
                .key(ColumnNames.ID.getColumnName())
                .attributeValue(List.of(AttributeValue.builder().n(String.valueOf(id)).build()))
                .operator(ComparisonOperator.GE)
                .build());

        val results = getRecordsByKeys(keys);
        val deleteCount = results
            .map(decision -> {
                val del = DeleteItemRequest.builder()
                    .tableName(dynamoDbProperties.getTableName())
                    .key(CollectionUtils.wrap(ColumnNames.ID.getColumnName(),
                        AttributeValue.builder().n(String.valueOf(decision.getId())).build()))
                    .build();
                LOGGER.debug("Submitting delete request [{}] for decision id [{}] and principal [{}]", del, id, principal);
                val res = amazonDynamoDBClient.deleteItem(del);
                LOGGER.debug("Delete request came back with result [{}]", res);
                return res;
            })
            .filter(Objects::nonNull)
            .count();
        return deleteCount > 0;
    }
Delete.

@param id        the id
@param principal the principal
@return true/false
support/cas-server-support-consent-dynamodb/src/main/java/org/apereo/cas/consent/DynamoDbConsentFacilitator.java