I used to have an ElasticSearch Service instance (t2.micro.search) set up to enable a search functionality for an app hosted on Heroku. That old setup was working fine.
I now tried to set up a new instance (t3.small.search) using the same settings as the previous one. However, when I tried to build the index from Heroku, I got this error:
TransportError(403, '{"Message":"User: anonymous is not authorized to perform: es:ESHttpPost with an explicit deny in a resource-based policy"}'
I realized my access policy has "Deny" instead of "Allow" I had before:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Deny",
"Principal": {
"AWS": "*"
},
"Action": "es:*",
"Resource": "arn:aws:es:us-east-1:000000000000:domain/my-domain/*"
}
]
}
I tried to change it to "Allow" but the console would not allow me to save the settings ("Apply a restrictive access policy to your domain").
Does somebody know how to set up the access policy so I can continue to use AWS OpenSearch for a Heroku app?