public Map<String, AttributeValue> buildTableAttributeValuesMapFromService(final RegisteredService service) throws Exception {
        val values = new HashMap<String, AttributeValue>();
        values.put(ColumnNames.ID.getColumnName(), AttributeValue.builder().s(String.valueOf(service.getId())).build());
        values.put(ColumnNames.NAME.getColumnName(), AttributeValue.builder().s(String.valueOf(service.getName())).build());
        values.put(ColumnNames.DESCRIPTION.getColumnName(), AttributeValue.builder().s(String.valueOf(service.getDescription())).build());
        values.put(ColumnNames.SERVICE_ID.getColumnName(), AttributeValue.builder().s(String.valueOf(service.getServiceId())).build());
        try (val out = new ByteArrayOutputStream()) {
            jsonSerializer.to(out, service);
            values.put(ColumnNames.ENCODED.getColumnName(), AttributeValue.builder().b(SdkBytes.fromByteArray(out.toByteArray())).build());
        }
        LOGGER.debug("Created attribute values [{}] based on provided service [{}]", values, service);
        return values;
    }
Build table attribute values from map.

@param service the service
@return the map
@throws Exception the exception
support/cas-server-support-dynamodb-service-registry/src/main/java/org/apereo/cas/services/DynamoDbServiceRegistryFacilitator.java