Custom Index for Functionbeat

Hi Team, I am trying to deploy function beat to read AWS logs which i am succesfully able to do.

However, i require different index to be created in Elasticsearch for different log groups.Below id the elasticsearch output condition i used, which isnt working.

  # Array of hosts to connect to.
  hosts: [""]
    - index: "xyz"
      log_group: "ec2"

I also tried providing the full log groups name under the log_group.
Elastic search version : 7.7.1
Functionbeat version : 7.9.0
Please help me to understand and resolve the issue.

Team, Is there anything i can try? I'd really appreciate any guidance. Thanks!

Here is a similar thread: Handling multiples modules output to multiples indexes, good practice?

Able to create new index by using below configuration on top of output.elasticsearch in functionbeat.yml

setup.ilm.enabled: false "xyz"
setup.template.pattern: "xyz-*"

Egsyefsi 5wvuxtsy7wfehd7sfshfsydgxhs6svcbysicjdhufushdufhshfsfshd8chfgdjxydhjehdfeu

Dyehdhdudud dudduat