AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::Cognito::IdentityPoolRoleAttachment

CfnIdentityPoolRoleAttachment

The `AWS::Cognito::IdentityPoolRoleAttachment` resource manages the role configuration for an Amazon Cognito identity pool.

Import

import { CfnIdentityPoolRoleAttachment } from 'aws-cdk-lib/aws-cognito';

Or use the module namespace:

import * as cognito from 'aws-cdk-lib/aws-cognito';
// cognito.CfnIdentityPoolRoleAttachment

Properties

Configuration passed to the constructor as CfnIdentityPoolRoleAttachmentProps.

identityPoolIdRequired
string | IIdentityPoolRef

An identity pool ID in the format `REGION:GUID` .

roleMappingsOptional
IResolvable | { [key: string]: IResolvable | RoleMappingProperty }

How users for a specific identity provider are mapped to roles. This is a string to the `RoleMapping` object map. The string identifies the identity provider. For example: `graph.facebook.com` or `cognito-idp.us-east-1.amazonaws.com/us-east-1_abcdefghi:app_client_id` . If the `IdentityProvider` field isn't provided in this object, the string is used as the identity provider name. For more information, see the [RoleMapping property](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-identitypoolroleattachment-rolemapping.html) .

rolesOptional
any

The map of the roles associated with this pool. For a given role, the key is either "authenticated" or "unauthenticated". The value is the role ARN.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Get the Amazon Cognito Cheat Sheet

Everything you need to know about Amazon Cognito on one page. HD quality, print-friendly.

Download Free Infographic