How to intergate logstash with opensearch for logstash-output-opensearch

I am using logstash and AWS OpenSearch. I already installed logstash ( sudo apt-get install logstash) in my logstash server. I have created both input and output file.

Error
 { action=>LogStash::PipelineAction::Create/pipeline_id:main, exception=>"LogStash::PluginLoadingError", message=>"Couldn't find any output plugin named "opensearch"}

    input {
      file {
        path => "/dev/**/*"
        exclude => [ "access_log", "error_log" ]
        ignore_older => "2 d"
        start_position => "beginning"
        tags =>["dev"]
      }
     file {
        path => "/prod/**/*"
        exclude => [ "access_log", "error_log" ]
        ignore_older => "2 d"
        start_position => "beginning"
        tags =>["prod"]
      }
     
    }


    output {
    if "dev" in [tags]{
    opensearch {
          hosts => ["domainname"]
          index => "dev--%{+xxxx.ww}"
          region => "myregion"
          user => "****"
          password => "****"
          max_bulk_bytes => 9999999
      }
    }
    if "prod" in [tags]{
    opensearch {
          hosts => ["domain"]
          index => "dev--%{+xxxx.ww}"
          region => "myregion"
          user => "****"
          password => "****"
          max_bulk_bytes => 9999999
      }
    }
    }`

``



Use the Logstash OSS from https://opensearch.org/downloads.html, not from elastic.co:

curl https://artifacts.opensearch.org/logstash/logstash-oss-with-opensearch-output-plugin-7.16.2-linux-x64.tar.gz -o logstash-oss-with-opensearch-output-plugin-7.16.2-linux-x64.tar.gz

tar -zxvf logstash-oss-with-opensearch-output-plugin-7.16.2-linux-x64.tar.gz

run logstash from ~/logstash-7.16.2/bin