@Bean
    @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    public SamlIdPMetadataGenerator samlIdPMetadataGenerator(
        final ConfigurableApplicationContext applicationContext,
        final CasConfigurationProperties casProperties,
        @Qualifier("samlIdPMetadataGeneratorConfigurationContext")
        final SamlIdPMetadataGeneratorConfigurationContext samlIdPMetadataGeneratorConfigurationContext,
        @Qualifier("amazonS3Client")
        final S3Client amazonS3Client) {
        return BeanSupplier.of(SamlIdPMetadataGenerator.class)
            .when(CONDITION.given(applicationContext.getEnvironment()))
            .supply(Unchecked.supplier(() -> {
                val idp = casProperties.getAuthn().getSamlIdp();
                val generator = new AmazonS3SamlIdPMetadataGenerator(samlIdPMetadataGeneratorConfigurationContext, amazonS3Client,
                    idp.getMetadata().getAmazonS3().getIdpMetadataBucketName());
                generator.generate(Optional.empty());
                return generator;
            }))
            .otherwiseProxy()
            .get();
    }
This is {@link AmazonS3SamlIdPMetadataConfiguration}.

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