33Add-on to [ elasticsearch-net / NEST] ( https://github.com/elastic/elasticsearch-net ) for using AWS's elasticsearch service.
44
55## Install Package
6- On Nuget
6+
7+ On Nuget:
8+
79* [ Current Version 5.0+] ( https://www.nuget.org/packages/Elasticsearch.Net.Aws/ )
810* [ NEST / Elasticsearch.Net 2.X] ( https://www.nuget.org/packages/bcuff.Elasticsearch.Net.Aws-v2/ )
911* [ NEST / Elasticsearch.Net 1.X] ( https://www.nuget.org/packages/Elasticsearch.Net.Aws-v1/ )
@@ -27,36 +29,47 @@ dotnet add package Elasticsearch.Net.Aws-v1
2729
2830## Setup
2931
30- #### Elasticsearch.Net Version >= 2.0.2
32+ ### Elasticsearch.Net Version >= 2.0.2
3133
32- ** Use Package Elasticsearch.Net.Aws**
34+ Use Package [ Elasticsearch.Net.Aws] ( https://www.nuget.org/packages/Elasticsearch.Net.Aws/ ) .
35+
36+ #### Typical Setup
3337
3438``` csharp
3539// for NEST
3640
37- // if using app.config, environment variables, or roles
3841// This constructor will look up AWS credentials in the
3942// same way that the AWSSDK does automatically.
40- var httpConnection = new AwsHttpConnection (" us-east-1 " );
43+ var httpConnection = new AwsHttpConnection ();
4144
4245var pool = new SingleNodeConnectionPool (new Uri (" http://localhost:9200" ));
4346var config = new ConnectionSettings (pool , httpConnection );
4447var client = new ElasticClient (config );
4548```
4649
50+ #### .NET Core Applications using IConfiguration
51+
52+ ``` csharp
53+ IConfiguration config = Configuration ;
54+ var options = config .GetAWSOptions ();
55+ var httpConnection = new AwsHttpConnection (options );
56+
57+ // same as above
58+ ```
59+
4760#### Elasticsearch.Net Version 1.7.1
4861
49- ** Use Package Elasticsearch.Net.Aws-v1**
62+ Use Package [ Elasticsearch.Net.Aws-v1] ( https://www.nuget.org/packages/Elasticsearch.Net.Aws-v1 )
5063
5164Source for this version is maintained on the version-1 branch
5265
5366``` csharp
5467// for NEST
5568var client = new ElasticClient (settings , connection : new AwsHttpConnection (settings , new AwsSettings
5669{
57- AccessKey = " My AWS access key" ,
58- SecretKey = " My AWS secret key" ,
59- Region = " us-east-1" ,
70+ AccessKey = " My AWS access key" ,
71+ SecretKey = " My AWS secret key" ,
72+ Region = " us-east-1" ,
6073}));
6174```
6275
0 commit comments