How to use 'logstash-input-opensearch' , if I have IAM User as master user

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):

2.9

Describe the issue:
I was trying to configure a pipeline, which reads data from my AWS Opensearch domain and dumps into s3. For this I was using logstash-input-opensearch.
I was able to successfully dump my data to AWS S3 if I have Internal user as Master user, but was not able to dump when my master user is IAM.

I am not able to figure out what is correct way of configuration to this job.

For Internal User I used the following Logstash config:

input {
    opensearch {
        hosts => ["DOMAIN_URL:443"]
        query => '{"query":{"match_all":{}}}'
        user  => "USERNAME"
        password => "PASSWORD"
        index => "INDEX_NAME"
    }

}

PLEASE HELP.

Configuration:

Relevant Logs or Screenshots:

hi Rishab, did you ever fix this issue? I am having the exact same problem at the moment → amazon web services - Why do I get 403 errors when attempting to transfer with Logstash from an Opensearch domain index to a Serverless collection index? - Stack Overflow