private void resolveHostForOutpostNonArnRequest(Request<?> request) {
        String signingRegion = request.getHandlerContext(HandlerContextKey.SIGNING_REGION);

        validateIsTrue(!isDualstackEnabled(request),
                        "Dual stack is not supported for outpost requests.");
        validateIsTrue(!isFipsEnabledInClientConfig(request) && !isFipsRegion(signingRegion),
                        "FIPS endpoints are not supported for outpost requests.");

        request.addHandlerContext(HandlerContextKey.SIGNING_NAME, "s3-outposts");

        if (!isEndpointOverridden(request)) {
            String signingDnsSuffix = RegionUtils.getRegion(signingRegion).getDomain();
            replaceHost(request, String.format("s3-outposts.%s.%s", signingRegion, signingDnsSuffix));
        }
    }
{@link RequestHandler2} that modifies the endpoint to handle virtual addressing (account id hoisting),
Dual-Stack, and FIPS.
aws-java-sdk-s3control/src/main/java/com/amazonaws/services/s3control/internal/handlers/EndpointHandler.java