예제 #1
0
        public static DynamoDbConfigurationProvider Create()
        {
            if (_dynamoDbConfigurationProvider == null)
            {
                _dynamoDbConfigurationProvider = GetDynamoDbConfigurationProvider();
            }

            return(_dynamoDbConfigurationProvider);
        }
예제 #2
0
        private static DynamoDbConfigurationProvider GetDynamoDbConfigurationProvider()
        {
            var client = new AmazonDynamoDBClient(
                new AmazonDynamoDBConfig
            {
                RegionEndpoint = RegionEndpoint.EUWest1, ProxyCredentials = CredentialCache.DefaultCredentials
            });

            var environmentService = new EnvironmentService();
            var logger             = LogManager.GetLogger(nameof(DynamoDbConfigurationProvider));

            var config = new DynamoDbConfigurationProvider(environmentService, client, logger);

            return(config);
        }