private static void assertNotObjectLambdaUrl(URL url, String operation) {
        if (isObjectLambdaHost(url)) {
            String error = String.format("%s does not support S3 Object Lambda resources", operation);
            throw new IllegalArgumentException(error);
        }
    }
If the client has been marked as immutable then throw an {@link
UnsupportedOperationException}, otherwise do nothing. Should be called by each mutating
method.
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/TransferManager.java