Hi
I'm using python client:Python Elasticsearch Client — Elasticsearch 8.0.0 documentation to initiate API calls to my ES hosted behind AWS API gateway.
Can i use the SDK to talk to my ES stack if mTLS has been enabled?
I tried connecting using the snippet below but it failed:
es = Elasticsearch(
url,
client_cert=cert,
client_key=key,
verify_certs=False,
headers={"x-api-key": "mykey"}
)
My API gateway will require:
client cert,client key and x-api-key
I can confirm that initiating the below curl works perfectly:
curl -X GET '{host}:443/_cluster/health?pretty' --header "x-api-key: {}" --cert /home/ec2-user/{}.cer --key /home/ec2-user/{}.pem