Fix IAM PassRole for OpenSearch -- 2

Job ID: 40243956

Budget: ₹600 – ₹1,500 INR

I’m trying to trigger a snapshot directly from the OpenSearch Dashboards Dev Tools console, yet every attempt fails with the message:

“user anonymous is not authorized to perform iam:PassRole because no resource-based policy allows the iam:PassRole action.”

I have full access to adjust the relevant IAM roles and policies, but I’m clearly missing the exact permissions or resource-based policy statement that OpenSearch expects when it calls iam:PassRole during the snapshot operation.

What I need from you
• Identify the precise trust and permissions statements that must be added to both the role OpenSearch assumes and the target role it tries to pass.

• Confirm the fix by providing the Dev Tools command I should re-run and the expected JSON response that indicates the snapshot has started successfully.

Feel free to reference AWS IAM, OpenSearch 2.x, or the AWS CLI—whichever makes the explanation clearest. Once I apply your policy changes, the command must execute without the iam:PassRole error and the snapshot should enter the STARTED state.
Related categories: Cloud Computing Terraform