Elasticsearch Service allows IAM User which is configured in the aws credentials provider under the profile name: myprofile
.
We use the requests_aws4auth
to validate the request and pass the auth to requests:
$ python python_requests_elasticsearch_iam.py
{
"name": "xx",
"cluster_name": "xx:domain-name",
"cluster_uuid": "xx",
"version": {
"number": "6.7.0",
"build_flavor": "oss",
"build_type": "zip",
"build_hash": "xx",
"build_date": "2019-04-17T05:34:35.022392Z",
"build_snapshot": false,
"lucene_version": "7.7.0",
"minimum_wire_compatibility_version": "5.6.0",
"minimum_index_compatibility_version": "5.0.0"
},
"tagline": "You Know, for Search"
}