@ConditionalOnMissingBean(name = "amazonCognitoIdentityProvider")
    @Bean
    @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    public CognitoIdentityProviderClient amazonCognitoIdentityProvider(
        final CasConfigurationProperties casProperties) {
        val props = casProperties.getAuthn().getCognito();
        val provider = ChainingAWSCredentialsProvider.getInstance(props.getCredentialAccessKey(), props.getCredentialSecretKey());
        val builder = CognitoIdentityProviderClient.builder();
        AmazonClientConfigurationBuilder.prepareSyncClientBuilder(builder, provider, props);
        return builder.build();
    }
This is {@link CasAmazonCognitoAuthenticationAutoConfiguration}.

@author Misagh Moayyed
@since 6.0.0
support/cas-server-support-aws-cognito-authentication/src/main/java/org/apereo/cas/config/CasAmazonCognitoAuthenticationAutoConfiguration.java