public UnitTest1(ITestOutputHelper testOutputHelper) { _testOutputHelper = testOutputHelper; var containerService = new Builder() .UseContainer() .WithName("dynamodb-outbox") .UseImage("amazon/dynamodb-local:1.13.0") .KeepRunning() .ReuseIfExists() .Command("", "-jar", "DynamoDBLocal.jar", "-inMemory", "-sharedDb") .ExposePort(8000, 8000) .WaitForPort("8000/tcp", 5000, "127.0.0.1") .Build(); _service = containerService.Start(); var awsCredentials = new BasicAWSCredentials("ignored", "ignored"); var dynamoDBConfig = new AmazonDynamoDBConfig { ServiceURL = "http://localhost:8000", }; _client = new AmazonDynamoDBClient(awsCredentials, dynamoDBConfig); var streamsConfig = new AmazonDynamoDBStreamsConfig { ServiceURL = dynamoDBConfig.ServiceURL }; _streamsClient = new AmazonDynamoDBStreamsClient(awsCredentials, streamsConfig); }
private static IAmazonDynamoDBStreams CreateStreamClient(IConfiguration configuration) { var credentials = GetAwsCredentials(configuration); var serviceUrl = configuration.GetValue <string>("DynamoDb:LocalServiceUrl"); var clientConfig = new AmazonDynamoDBStreamsConfig { ServiceURL = serviceUrl }; return(new AmazonDynamoDBStreamsClient(credentials, clientConfig)); }
public void TestDynamoDBStreamWithServiceURL() { var config = new AmazonDynamoDBStreamsConfig(); config.ServiceURL = "https://streams.dynamodb.us-east-1.amazonaws.com/"; using (var client = new AmazonDynamoDBStreamsClient(config)) { var response = client.ListStreams(); Assert.IsNotNull(response.Streams); } }
protected IAmazonDynamoDBStreams CreateClient(AWSCredentials credentials, RegionEndpoint region) { var config = new AmazonDynamoDBStreamsConfig { RegionEndpoint = region }; Amazon.PowerShell.Utils.Common.PopulateConfig(this, config); this.CustomizeClientConfig(config); var client = new AmazonDynamoDBStreamsClient(credentials, config); client.BeforeRequestEvent += RequestEventHandler; client.AfterResponseEvent += ResponseEventHandler; return(client); }