@Bean
    @ConditionalOnMissingBean(name = "cloudWatchClient")
    public CloudWatchAsyncClient cloudWatchClient() throws Exception {
        val clientBuilder = CloudWatchAsyncClient
            .builder()
            .region(Region.US_EAST_1)
            .credentialsProvider(ChainingAWSCredentialsProvider.getInstance());

        val environmentVariable = AWS_SYSTEM_PROPERTY_CLOUDWATCH_ENDPOINT.toUpperCase(Locale.ENGLISH).replace('.', '_');
        val endpoint = System.getProperty(AWS_SYSTEM_PROPERTY_CLOUDWATCH_ENDPOINT, System.getenv(environmentVariable));
        if (StringUtils.isNotBlank(endpoint)) {
            clientBuilder.endpointOverride(new URI(endpoint));
        }
        return clientBuilder.build();
    }
System property to specify the endpoint for AWS cloudwatch.
support/cas-server-support-aws-cloudwatch/src/main/java/org/apereo/cas/config/CasAmazonCloudWatchMetricsConfiguration.java