{"id":27270201,"url":"https://github.com/bcuff/elasticsearch-net-aws","last_synced_at":"2025-04-11T12:09:09.380Z","repository":{"id":1769964,"uuid":"44559004","full_name":"bcuff/elasticsearch-net-aws","owner":"bcuff","description":"Add-on to Elasticsearch.Net \u0026 NEST for using AWS's elasticsearch service.","archived":false,"fork":false,"pushed_at":"2022-09-27T19:09:16.000Z","size":267,"stargazers_count":72,"open_issues_count":4,"forks_count":27,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-08T09:05:37.577Z","etag":null,"topics":["aws","aws-elasticsearch","c-sharp","dot-net-client","elasticsearch","elasticsearch-net","nest"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bcuff.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-19T19:38:12.000Z","updated_at":"2023-09-23T17:53:36.000Z","dependencies_parsed_at":"2022-08-19T15:20:45.591Z","dependency_job_id":null,"html_url":"https://github.com/bcuff/elasticsearch-net-aws","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcuff%2Felasticsearch-net-aws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcuff%2Felasticsearch-net-aws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcuff%2Felasticsearch-net-aws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcuff%2Felasticsearch-net-aws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bcuff","download_url":"https://codeload.github.com/bcuff/elasticsearch-net-aws/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247964110,"owners_count":21025148,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","aws-elasticsearch","c-sharp","dot-net-client","elasticsearch","elasticsearch-net","nest"],"created_at":"2025-04-11T12:09:08.346Z","updated_at":"2025-04-11T12:09:09.372Z","avatar_url":"https://github.com/bcuff.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Elasticsearch Net for Amazon AWS\n\nAdd-on to [elasticsearch-net / NEST](https://github.com/elastic/elasticsearch-net) for using AWS's elasticsearch service.\n\n## Install Package\n\nOn Nuget:\n\n* [Current Version 5.0+](https://www.nuget.org/packages/Elasticsearch.Net.Aws/)\n* [NEST / Elasticsearch.Net 2.X](https://www.nuget.org/packages/bcuff.Elasticsearch.Net.Aws-v2/)\n* [NEST / Elasticsearch.Net 1.X](https://www.nuget.org/packages/Elasticsearch.Net.Aws-v1/)\n\n```PowerShell\n# For ElasticSearch.Net \u003e= 5.0.0\nInstall-Package Elasticsearch.Net.Aws\n# or for dotnet core\ndotnet add package Elasticsearch.Net.Aws\n\n# For ElasticSearch.Net 2.X\nInstall-Package bcuff.Elasticsearch.Net.Aws-v2\n# or for dotnet core\ndotnet add package bcuff.Elasticsearch.Net.Aws-v2\n\n# For ElasticSearch.Net 1.X\nInstall-Package Elasticsearch.Net.Aws-v1\n# or for dotnet core\ndotnet add package Elasticsearch.Net.Aws-v1\n```\n\n## Setup\n\n### Elasticsearch.Net Version \u003e= 2.0.2\n\nUse Package [Elasticsearch.Net.Aws](https://www.nuget.org/packages/Elasticsearch.Net.Aws/).\n\n#### Typical Setup\n\n```csharp\n// for NEST\n\n// This constructor will look up AWS credentials in the\n// same way that the AWSSDK does automatically.\nvar httpConnection = new AwsHttpConnection();\n\nvar pool = new SingleNodeConnectionPool(new Uri(\"http://localhost:9200\"));\nvar config = new ConnectionSettings(pool, httpConnection);\nvar client = new ElasticClient(config);\n```\n\n#### .NET Core Applications using IConfiguration\n\n```csharp\nIConfiguration config = Configuration;\nvar options = config.GetAWSOptions();\nvar httpConnection = new AwsHttpConnection(options);\n\n// same as above\n```\n\n#### Elasticsearch.Net Version 1.7.1\n\nUse Package [Elasticsearch.Net.Aws-v1](https://www.nuget.org/packages/Elasticsearch.Net.Aws-v1)\n\nSource for this version is maintained on the version-1 branch\n\n```csharp\n// for NEST\nvar client = new ElasticClient(settings, connection: new AwsHttpConnection(settings, new AwsSettings\n{\n    AccessKey = \"My AWS access key\",\n    SecretKey = \"My AWS secret key\",\n    Region = \"us-east-1\",\n}));\n```\n\nThe `AwsHttpConnection` class is an implemenation of `IConnection` that will sign the HTTP requests according to the [Version 4 Signing Process](http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html).\n\n#### Serilog Sink Setup\n\nIn Code\n```csharp\n  const string esUrl = \"https://aws-es-thinger.us-west-1.es.amazonaws.com\";\n  Log.Logger = new LoggerConfiguration()\n                .WriteTo.Elasticsearch(new ElasticsearchSinkOptions(new Uri(esUrl))\n                {\n                    ModifyConnectionSettings = conn =\u003e\n                    {\n                        var httpConnection = new AwsHttpConnection(\"us-east-1\");\n                        var pool = new SingleNodeConnectionPool(new Uri(esUrl));\n                        return new ConnectionConfiguration(pool, httpConnection);\n                    }\n                })\n                .CreateLogger();\n```\n\nIn Configuration\n```json\n{\n    \"Serilog\": {\n        \"Using\": [\"Serilog\", \"Serilog.Exceptions\", \"Serilog.Sinks.Elasticsearch\", \"Serilog.Enrichers.Environment\", \"Serilog.Enrichers.Process\"],\n        \"MinimumLevel\": \"Debug\",\n        \"WriteTo\": [{\n                \"Name\": \"Elasticsearch\",\n                \"Args\": {\n                    \"nodeUris\": \"https://******.us-east-1.es.amazonaws.com\",\n                    \"numberOfShards\": 5,\n                    \"numberOfReplicas\": 10,\n                    \"connection\": \"Elasticsearch.Net.Aws.AwsHttpConnection, Elasticsearch.Net.Aws\"\n                }\n            }\n        ],\n        \"Enrich\": [\"FromLogContext\", \"WithMachineName\", \"WithExceptionDetails\"],\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcuff%2Felasticsearch-net-aws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbcuff%2Felasticsearch-net-aws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcuff%2Felasticsearch-net-aws/lists"}