@Override
    public CsmConfiguration getConfiguration() {
        String enabled = System.getenv(AWS_CSM_ENABLED_ENV_VAR);

        if (enabled == null) {
            throw new SdkClientException("Unable to load Client Side Monitoring configurations from"
                                         + " environment variables!");
        }

        String host = System.getenv(AWS_CSM_HOST_ENV_VAR);
        host = host == null ? DEFAULT_AWS_CSM_HOST : host;
        String port = System.getenv(AWS_CSM_PORT_ENV_VAR);
        String clientId = System.getenv(AWS_CSM_CLIENT_ID_ENV_VAR);
        clientId = clientId == null ? DEFAULT_AWS_CSM_CLIENT_ID : clientId;

        try {
            int portNumber = port == null ? DEFAULT_AWS_CSM_PORT : Integer.parseInt(port);
            return CsmConfiguration.builder()
                    .withEnabled(Boolean.parseBoolean(enabled))
                    .withHost(host)
                    .withPort(portNumber)
                    .withClientId(clientId)
                    .build();
        } catch (Exception e) {
            throw new SdkClientException("Unable to load Client Side Monitoring configurations from"
                    + " environment variables!", e);
        }
    }
Configuration provider that sources the client side monitoring
configuration parameters from environment variables.

@see com.amazonaws.SDKGlobalConfiguration#AWS_CSM_CLIENT_ID_ENV_VAR
@see com.amazonaws.SDKGlobalConfiguration#AWS_CSM_ENABLED_ENV_VAR
@see com.amazonaws.SDKGlobalConfiguration#AWS_CSM_PORT_ENV_VAR
aws-java-sdk-core/src/main/java/com/amazonaws/monitoring/EnvironmentVariableCsmConfigurationProvider.java