IAM Policies Reference

This page is the complete reference for all IAM actions used with OpenSearch UI applications. Permissions are organized into two tiers: base permissions (required for all applications) and IDC-specific permissions (only needed if using IAM Identity Center).

Tier 1: Base permissions (all applications)

These permissions are required regardless of your authentication method.

Application management

ActionPurposeResource
es:CreateApplicationCreate new applicationsarn:aws:opensearch:<REGION>:<ACCOUNT>:application/*
es:GetApplicationView application details in AWS Consolearn:aws:opensearch:<REGION>:<ACCOUNT>:application/<APP_ID>
es:UpdateApplicationModify application settingsarn:aws:opensearch:<REGION>:<ACCOUNT>:application/<APP_ID>
es:DeleteApplicationDelete applicationsarn:aws:opensearch:<REGION>:<ACCOUNT>:application/<APP_ID>
es:ListApplicationsList all applicationsarn:aws:opensearch:<REGION>:<ACCOUNT>:application/*

Tag management

ActionPurposeResource
es:AddTagsAdd tags to applicationsarn:aws:opensearch:<REGION>:<ACCOUNT>:application/<APP_ID>
es:ListTagsList tags on applicationsarn:aws:opensearch:<REGION>:<ACCOUNT>:application/<APP_ID>
es:RemoveTagsRemove tags from applicationsarn:aws:opensearch:<REGION>:<ACCOUNT>:application/<APP_ID>

Data source access

ActionPurposeResource
aoss:BatchGetCollectionAssociate serverless collectionsCollection ARN
es:DescribeDomainAssociate OpenSearch domainsDomain ARN
es:GetDirectQueryDataSourceAssociate direct query data sourcesDomain ARN

Application UI access

ActionPurposeResource
opensearch:ApplicationAccessAllAccess the application UIarn:aws:opensearch:<REGION>:<ACCOUNT>:application/*
aoss:APIAccessAllAccess serverless collection dataCollection ARN
es:ESHttp*Access domain data via HTTPDomain ARN
opensearch:*DirectQuery*Access direct query data sourcesDomain ARN

Service-linked role

ActionPurposeResource
iam:CreateServiceLinkedRoleAllows OpenSearch to publish CloudWatch metricsarn:aws:iam::*:role/aws-service-role/opensearchservice.amazonaws.com/*

Tier 2: IDC-specific permissions (SSO only)

These permissions are only needed if you're using IAM Identity Center for authentication. Add them on top of the base permissions.

IDC application management

ActionPurposeResource
sso:CreateApplicationRegister the app with IDC*
sso:DeleteApplicationRemove the IDC app registration*
sso:PutApplicationGrantConfigure IDC grants for the app*
sso:PutApplicationAuthenticationMethodSet IDC auth method*
sso:PutApplicationAccessScopeConfigure IDC access scopes*
sso:PutApplicationAssignmentConfigurationConfigure user assignment settings*
sso:GetApplicationGrantRead IDC grant configuration*
sso:ListInstancesList IDC instances in the account*

IAM role management for IDC

ActionPurposeResource
iam:PassRolePass the IAM role to the IDC applicationRole ARN
iam:CreateRoleCreate the IAM role for IDC (if creating new)*
iam:AttachRolePolicyAttach policies to the IDC roleRole ARN

Minimum policy for UI access

The simplest policy to grant a user access to an OpenSearch UI application:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "opensearch:ApplicationAccessAll",
            "Resource": "arn:aws:opensearch:<REGION>:<ACCOUNT_ID>:application/*"
        }
    ]
}

To scope to a specific application, replace * with the application ID:

"Resource": "arn:aws:opensearch:<REGION>:<ACCOUNT_ID>:application/<APP_ID>"

Full admin policy (application management + IDC)

For administrators who need to create and manage applications with IDC:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "ApplicationManagement",
            "Effect": "Allow",
            "Action": [
                "es:CreateApplication",
                "es:GetApplication",
                "es:UpdateApplication",
                "es:DeleteApplication",
                "es:ListApplications",
                "es:AddTags",
                "es:ListTags",
                "es:RemoveTags"
            ],
            "Resource": "arn:aws:opensearch:<REGION>:<ACCOUNT_ID>:application/*"
        },
        {
            "Sid": "DataSourceAccess",
            "Effect": "Allow",
            "Action": [
                "aoss:BatchGetCollection",
                "es:DescribeDomain",
                "es:GetDirectQueryDataSource"
            ],
            "Resource": "*"
        },
        {
            "Sid": "ApplicationUIAccess",
            "Effect": "Allow",
            "Action": "opensearch:ApplicationAccessAll",
            "Resource": "arn:aws:opensearch:<REGION>:<ACCOUNT_ID>:application/*"
        },
        {
            "Sid": "IDCIntegration",
            "Effect": "Allow",
            "Action": [
                "sso:CreateApplication",
                "sso:DeleteApplication",
                "sso:PutApplicationGrant",
                "sso:PutApplicationAuthenticationMethod",
                "sso:PutApplicationAccessScope",
                "sso:PutApplicationAssignmentConfiguration",
                "sso:GetApplicationGrant",
                "sso:ListInstances"
            ],
            "Resource": "*"
        },
        {
            "Sid": "PassRoleForIDC",
            "Effect": "Allow",
            "Action": "iam:PassRole",
            "Resource": "arn:aws:iam::<ACCOUNT_ID>:role/OpenSearchUI-IDC-Role"
        },
        {
            "Sid": "ServiceLinkedRole",
            "Effect": "Allow",
            "Action": "iam:CreateServiceLinkedRole",
            "Resource": "arn:aws:iam::*:role/aws-service-role/opensearchservice.amazonaws.com/*"
        }
    ]
}

Replace <REGION>, <ACCOUNT_ID>, and role names with your actual values. Scope resources as narrowly as possible for production use.

Common mistakes

MistakeWhy it failsCorrect action
Using es:ESHttpGet for app accessWrong namespace — applications use opensearch:, not es:Use opensearch:ApplicationAccessAll
Using es:ApplicationLoginThis action does not exist or grant UI accessUse opensearch:ApplicationAccessAll
Using aoss:DashboardsAccessAllWorks but requires Resource: * — overly broadUse opensearch:ApplicationAccessAll with scoped resource
Scoping es:* to application ARNThe es: namespace does not authorize application accessUse opensearch:ApplicationAccessAll
Missing iam:PassRole for IDC setupCan't associate the IAM role with the IDC applicationAdd iam:PassRole scoped to the specific role ARN
Using opensearch actions with es: prefixDifferent service namespacesopensearch: for application access, es: for domain/console operations

Related