@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    @Bean
    @ConditionalOnMissingBean(name = "amazonDynamoDbSamlIdPMetadataClient")
    public DynamoDbClient amazonDynamoDbSamlIdPMetadataClient(
        final ConfigurableApplicationContext applicationContext,
        final CasConfigurationProperties casProperties) throws Exception {
        return BeanSupplier.of(DynamoDbClient.class)
            .when(CONDITION.given(applicationContext.getEnvironment()))
            .supplyUnchecked(() -> {
                val dynamoDbProperties = casProperties.getAuthn().getSamlIdp().getMetadata().getDynamoDb();
                val factory = new AmazonDynamoDbClientFactory();
                val client = factory.createAmazonDynamoDb(dynamoDbProperties);
                if (!dynamoDbProperties.isPreventTableCreationOnStartup()) {
                    val attributes = List.of(AttributeDefinition.builder()
                        .attributeName(SamlIdPMetadataColumns.APPLIES_TO.getColumnName())
                        .attributeType(ScalarAttributeType.S)
                        .build());
                    val schema = List.of(KeySchemaElement.builder()
                        .attributeName(SamlIdPMetadataColumns.APPLIES_TO.getColumnName())
                        .keyType(KeyType.HASH)
                        .build());
                    DynamoDbTableUtils.createTable(client, dynamoDbProperties,
                        dynamoDbProperties.getIdpMetadataTableName(), dynamoDbProperties.isDropTablesOnStartup(),
                        attributes, schema);
                }
                return client;
            })
            .otherwiseProxy()
            .get();
    }
This is {@link SamlIdPDynamoDbIdPMetadataConfiguration}.

@author Misagh Moayyed
@since 7.2.0
support/cas-server-support-saml-idp-metadata-dynamodb/src/main/java/org/apereo/cas/config/SamlIdPDynamoDbIdPMetadataConfiguration.java