@ConditionalOnMissingBean(name = "amazonS3Client")
    @Bean
    @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    public S3Client amazonS3Client(final CasConfigurationProperties casProperties) {
        val amz = casProperties.getAuthn().getSamlIdp().getMetadata().getAmazonS3();
        val credentials = ChainingAWSCredentialsProvider.getInstance(amz.getCredentialAccessKey(),
            amz.getCredentialSecretKey(), amz.getProfilePath(), amz.getProfileName());
        val builder = S3Client.builder();
        AmazonClientConfigurationBuilder.prepareSyncClientBuilder(builder, credentials, amz);
        return builder.build();
    }
This is {@link AmazonS3SamlMetadataConfiguration}.

@author Misagh Moayyed
@since 6.0.0
support/cas-server-support-saml-idp-metadata-aws-s3/src/main/java/org/apereo/cas/config/AmazonS3SamlMetadataConfiguration.java