Skip to content

Go library providing easy IAM role access to AWS ElasticSearch Domain

Notifications You must be signed in to change notification settings

Haraj-backend/go-aws-es-http-transport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go AWS ElasticSearch HTTP Transport

Have you ever face confusion when trying to establish IAM access to AWS ElasticSearch Domain using Go?

The solution is actually very simple, we just need to sign every http request to our ElasticSearch Domain with correct AWS Signature V4. This library help you to do just that. 😉

How to Use

The library usage is very simple. We just need to set it up as our HTTP Client transport:

...
client := &http.Client{
    Transport: transport.NewAWSESTransport(session.New()),
}
...

Or if you are using Official ElasticSearch Client for Go, you could just do like following:

...
client, err := es6.NewClient(es6.Config{
    Addresses: []string{endpoint},
    Transport: transport.NewAWSESTransport(session.New()),
})
...

So simple, right? 😉

For more details please check out our examples directory.

Acknowledgement

This library is inspired by following resources:

We are just trying to make everything simpler and cleaner. 😉