View a markdown version of this page

Actions, resources, and condition keys for Amazon Cognito Identity - Service Authorization Reference
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Actions, resources, and condition keys for Amazon Cognito Identity

Amazon Cognito Identity (service prefix: cognito-identity) provides the following service-specific operations, resources, actions, and condition keys for use in IAM permission policies.

References:

API operations defined by Amazon Cognito Identity

The following table maps API operations to the IAM actions they authorize. Only condition keys that have static values for the given API and action are listed; for the full set of condition keys supported by each action, see the Actions table.

Operation IAM action Condition key Possible value(s) Access level

CreateIdentityPool

cognito-identity:CreateIdentityPool

Write

cognito-identity:TagResource

Tagging, Write

DeleteIdentities

cognito-identity:DeleteIdentities

Write

DeleteIdentityPool

cognito-identity:DeleteIdentityPool

Write

DescribeIdentity

cognito-identity:DescribeIdentity

Read

DescribeIdentityPool

cognito-identity:DescribeIdentityPool

Read

GetCredentialsForIdentity

cognito-identity:GetCredentialsForIdentity

Read

GetId

cognito-identity:GetId

Write

GetIdentityPoolRoles

cognito-identity:GetIdentityPoolRoles

Read

GetOpenIdToken

cognito-identity:GetOpenIdToken

Read

GetOpenIdTokenForDeveloperIdentity

cognito-identity:GetOpenIdTokenForDeveloperIdentity

Read

GetPrincipalTagAttributeMap

cognito-identity:GetPrincipalTagAttributeMap

Read

ListIdentities

cognito-identity:ListIdentities

List

ListIdentityPools

cognito-identity:ListIdentityPools

List

ListTagsForResource

cognito-identity:ListTagsForResource

Read

LookupDeveloperIdentity

cognito-identity:LookupDeveloperIdentity

Read

MergeDeveloperIdentities

cognito-identity:MergeDeveloperIdentities

Write

SetIdentityPoolRoles

cognito-identity:SetIdentityPoolRoles

Write

iam:PassRole

Write

SetPrincipalTagAttributeMap

cognito-identity:SetPrincipalTagAttributeMap

Write

TagResource

cognito-identity:TagResource

Tagging, Write

UnlinkDeveloperIdentity

cognito-identity:UnlinkDeveloperIdentity

Write

UnlinkIdentity

cognito-identity:UnlinkIdentity

Write

UntagResource

cognito-identity:UntagResource

Tagging, Write

UpdateIdentityPool

cognito-identity:TagResource

Tagging, Write

cognito-identity:UntagResource

Tagging, Write

cognito-identity:UpdateIdentityPool

Write

Actions defined by Amazon Cognito Identity

You can specify the following actions in the Action element of an IAM policy statement. Use policies to grant permissions to perform an operation in Amazon. When you use an action in a policy, you usually allow or deny access to the API operation or CLI command with the same name. However, in some cases, a single action controls access to more than one operation. Alternatively, some operations require several different actions.

Actions Description Resource types (*required) Condition keys Access level

CreateIdentityPool

Grants permission to create a new identity pool

aws:RequestTag/${TagKey}

aws:TagKeys

Write

DeleteIdentities

Grants permission to delete identities from an identity pool. You can specify a list of 1-60 identities that you want to delete

cognito-identity:IdentityPoolArn

Write

DeleteIdentityPool

Grants permission to delete a user pool. Once a pool is deleted, users will not be able to authenticate with the pool

identitypool*

aws:ResourceTag/${TagKey}

Write

DescribeIdentity

Grants permission to return metadata related to the given identity, including when the identity was created and any associated linked logins

cognito-identity:IdentityPoolArn

Read

DescribeIdentityPool

Grants permission to get details about a particular identity pool, including the pool name, ID description, creation date, and current number of users

identitypool*

aws:ResourceTag/${TagKey}

Read

GetCredentialsForIdentity

Grants permission to return credentials for the provided identity ID

cognito-identity-auth:AccountId

cognito-identity-auth:IdentityPoolArn

cognito-identity-unauth:AccountId

cognito-identity-unauth:IdentityPoolArn

Read

GetId

Grants permission to generate (or retrieve) a Cognito ID. Supplying multiple logins will create an implicit linked account

cognito-identity-auth:AccountId

cognito-identity-auth:IdentityPoolArn

cognito-identity-unauth:AccountId

cognito-identity-unauth:IdentityPoolArn

Write

GetIdentityPoolAnalytics

Grants permission to get analytics data about the total current identity count for all identity pool identity provider (IdPs)

identitypool*

aws:ResourceTag/${TagKey}

Read

GetIdentityPoolDailyAnalytics

Grants permission to get analytics data about the number of new identities and total identities for all identity pool identity providers (IdPs)

identitypool*

aws:ResourceTag/${TagKey}

Read

GetIdentityPoolRoles

Grants permission to get the roles for an identity pool

identitypool*

aws:ResourceTag/${TagKey}

Read

GetIdentityProviderDailyAnalytics

Grants permission to get analytics data about the number of new identities and total identities for one identity pool identity provider (IdPs)

identitypool*

aws:ResourceTag/${TagKey}

Read

GetOpenIdToken

Grants permission to get an OpenID token, using a known Cognito ID

cognito-identity-auth:AccountId

cognito-identity-auth:IdentityPoolArn

cognito-identity-unauth:AccountId

cognito-identity-unauth:IdentityPoolArn

Read

GetOpenIdTokenForDeveloperIdentity

Grants permission to register (or retrieve) a Cognito IdentityId and an OpenID Connect token for a user authenticated by your backend authentication process

identitypool*

aws:ResourceTag/${TagKey}

Read

GetPrincipalTagAttributeMap

Grants permission to get the principal tags for an identity pool and provider

identitypool*

aws:ResourceTag/${TagKey}

Read

ListIdentities

Grants permission to list the identities in an identity pool

identitypool*

aws:ResourceTag/${TagKey}

List

ListIdentityPools

Grants permission to list all of the Cognito identity pools registered for your account

List

ListTagsForResource

Grants permission to list the tags that are assigned to an Amazon Cognito identity pool

identitypool

aws:ResourceTag/${TagKey}

Read

LookupDeveloperIdentity

Grants permission to retrieve the IdentityId associated with a DeveloperUserIdentifier or the list of DeveloperUserIdentifiers associated with an IdentityId for an existing identity

identitypool*

aws:ResourceTag/${TagKey}

Read

MergeDeveloperIdentities

Grants permission to merge two users having different IdentityIds, existing in the same identity pool, and identified by the same developer provider

identitypool*

aws:ResourceTag/${TagKey}

Write

SetIdentityPoolRoles

Grants permission to set the roles for an identity pool. These roles are used when making calls to GetCredentialsForIdentity action

Write

SetPrincipalTagAttributeMap

Grants permission to set the principal tags for an identity pool and provider. These tags are used when making calls to GetOpenIdToken action

Write

TagResource

Grants permission to assign a set of tags to an Amazon Cognito identity pool

identitypool*

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

Tagging, Write

UnlinkDeveloperIdentity

Grants permission to unlink a DeveloperUserIdentifier from an existing identity

identitypool*

aws:ResourceTag/${TagKey}

Write

UnlinkIdentity

Grants permission to unlink a federated identity from an existing account

cognito-identity-auth:AccountId

cognito-identity-auth:IdentityPoolArn

Write

UntagResource

Grants permission to remove the specified tags from an Amazon Cognito identity pool

identitypool*

aws:ResourceTag/${TagKey}

aws:TagKeys

Tagging, Write

UpdateIdentityPool

Grants permission to update an identity pool

identitypool*

aws:ResourceTag/${TagKey}

Write

Resource types defined by Amazon Cognito Identity

The following resource types are defined by this service and can be used in the Resource element of IAM permission policy statements.

Resource types ARN Condition keys

identitypool

arn:${Partition}:cognito-identity:${Region}:${Account}:identitypool/${IdentityPoolId}

aws:ResourceTag/${TagKey}

Condition keys for Amazon Cognito Identity

Amazon Cognito Identity defines the following condition keys that can be used in the Condition element of an IAM policy.

Condition keys Description Type

aws:RequestTag/${TagKey}

Filters access by tag key-value pairs in the request

String

aws:ResourceTag/${TagKey}

Filters access by tag key-value pairs attached to the resource

String

aws:TagKeys

Filters access by a key that is present in the request

ArrayOfString

cognito-identity-auth:AccountId

Filters access by the owning Amazon Web Services account ID for identity pool authenticated users. Applies to unauthenticated (public) API operations

String

cognito-identity-auth:IdentityPoolArn

Filters access by the identity pool ID for a given authenticated-user identity ID. Applies to unauthenticated (public) API operations

ARN

cognito-identity-unauth:AccountId

Filters access by the owning Amazon Web Services account ID of an identity pool for identity pool guest users. Applies to unauthenticated (public) API operations

String

cognito-identity-unauth:IdentityPoolArn

Filters access by the identity pool ID for a given guest-user identity ID. Applies to unauthenticated (public) API operations

ARN

cognito-identity:IdentityPoolArn

Filters access by the identity pool ID for a given identity ID for DeleteIdentities and DescribeIdentity

ARN