Permissions to write data_streams

Versions: AWS OpenSearch 2.7.0

We currently equipped our software to write different types of log data to OpenSearch. In our newest version, we are using data streams, since those fit our data and usage patterns best. However, since then we have not been able to actually write data to OpenSearch - our dataimport user gets “Unauthorized” error messages. It seems that we need to update our permissions for this dataimport role. However, I tried several combinations of permissions for data_streams on cluster or index level and nothing works.

I did stumble upon this issue: Permissions required for logstash when using data streams and thought this exactly reads like my problem, so I tried extending index permissions to the .d-* index pattern and even tried giving several permissions to the * index pattern, when the more specific pattern did not work. However, I have not been able to solve this issue.

Our role has the following permissions at the moment (including some ism permissions I omitted here for brevity):

  "my_dataimport_user": {
    "reserved": false,
    "hidden": false,
    "cluster_permissions": [
    "index_permissions": [
        "index_patterns": [
        "fls": [],
        "masked_fields": [],
        "allowed_actions": [
    "tenant_permissions": [],
    "static": false

As I said, I also tried the following index permissions for the .ds-* Index pattern:


and also tried these for the index pattern * instead to no avail.
At the same time, I tried to enable our logging service to write templates as well, which also not worked, this is why the template permissions are mixed up in these.

I would very much appreciate your help!