public URI toURI() {
        validateHostnameCompliant(accountId, "accountId", "object lambda ARN");
        validateHostnameCompliant(accessPointName, "accessPointName", "object lambda ARN");

        String fipsSegment = Boolean.TRUE.equals(fipsEnabled) ? "-fips" : "";

        String uriString;
        if (endpointOverride == null) {
            if (Boolean.TRUE.equals(dualstackEnabled)) {
                throw new IllegalArgumentException("S3 Object Lambda does not support Dual stack endpoints");
            }

             uriString = String.format("%s://%s-%s.s3-object-lambda%s.%s.%s",
                    protocol,
                    accessPointName,
                    accountId,
                    fipsSegment,
                    region,
                    domain);
        } else {
            StringBuilder uriSuffix = new StringBuilder(endpointOverride.getHost());
            if (endpointOverride.getPort() > 0) {
                uriSuffix.append(":").append(endpointOverride.getPort());
            }
            if (endpointOverride.getPath() != null) {
                uriSuffix.append(endpointOverride.getPath());
            }

            uriString = String.format("%s://%s-%s.%s", protocol, accessPointName, accountId, uriSuffix);
        }

        return URI.create(uriString);
    }
Generate an endpoint URI with no path that maps to the Object Lambdas Access Point information stored in this builder.
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/S3ObjectLambdaEndpointBuilder.java