title: Denied AWS Opensearch write permission
body: <p>I'm trying to connect a spring boot application from AWS EKS to AWS Opensearch both of which reside in a VPC. Though the connection is successful im unable to write any data to the index.</p>
  <p>All the AWS resources - EKS and Opensearch are configured using terraform. I have mentioned the elasticsearch subnet CIDR in the egress which is attached to the application. Also, the application correctly assumes the EKS service account and the pod role - which I mentioned in the services stanza for Elasticsearch. In the policy which is attached to the pod role, I see all the permissions mentioned - ESHttpPost, ESHttpget, ESHttpPut, etc.</p>
  <p>This is the error I get,</p>
  <pre><code>{&quot;error&quot;:{&quot;root_cause&quot;: [{&quot;type&quot;:&quot;security_exception&quot;, &quot;reason&quot;:&quot;no 
  permissions for [indices:data/write/index] and User 
  [name=arn:aws:iam::ACCOUNT_NO:role/helloworld-demo-eks-PodRle- 
  hellodemo-role-1,backend_roles= 
  [arn:aws:iam::ACCOUNT_NO:role/helloworld-demo-eks-PodRle-hellodemo 
  role-1], requested 
  Tenant=null]&quot;}],&quot;type&quot;:&quot;security_exception&quot;, &quot;reason&quot;:&quot;no 
  permissions for [indices:data/write/index] and User 
  [name=arn:aws:iam::ACCOUNT_NO:role/helloworld demo-eks-PodRle- 
  hellodemo-role-1,
  backend_roles=[arn:aws:iam::ACCOUNT_NO:role/helloworld-demo-eks- 
  PodRle-hellodemo role-1], requested Tenant=null]&quot;},&quot;status&quot;:403}
  </code></pre>
  <p>Is there anything that I'm missing out on while configuring?</p>