AWS Amazon Cognito Identity Pool Roles Attachment
This page shows how to write Terraform and CloudFormation for Amazon Cognito Identity Pool Roles Attachment and write them securely.
aws_cognito_identity_pool_roles_attachment (Terraform)
The Identity Pool Roles Attachment in Amazon Cognito can be configured in Terraform with the resource name aws_cognito_identity_pool_roles_attachment. The following sections describe 3 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "aws_cognito_identity_pool_roles_attachment" "main" {
identity_pool_id = aws_cognito_identity_pool.identity-pool.id
roles = {
"authenticated" = aws_iam_role.authenticated.arn
}
}
resource "aws_cognito_identity_pool_roles_attachment" "main" {
identity_pool_id = aws_cognito_identity_pool.pool.id
roles = {
"authenticated" = aws_iam_role.lambda_exec.arn
}
}
resource "aws_cognito_identity_pool_roles_attachment" "roles_attachment" {
identity_pool_id = var.identity_pool_id
role_mapping {
identity_provider = var.identity_provider
ambiguous_role_resolution = var.ambiguous_role_resolution
Parameters
-
idoptional computed - string -
identity_pool_idrequired - string -
rolesrequired - map from string to string -
role_mappingset block-
ambiguous_role_resolutionoptional - string -
identity_providerrequired - string -
typerequired - string -
mapping_rulelist block-
claimrequired - string -
match_typerequired - string -
role_arnrequired - string -
valuerequired - string
-
-
Explanation in Terraform Registry
Provides an AWS Cognito Identity Pool Roles Attachment.
AWS::Cognito::IdentityPoolRoleAttachment (CloudFormation)
The IdentityPoolRoleAttachment in Cognito can be configured in CloudFormation with the resource name AWS::Cognito::IdentityPoolRoleAttachment. The following sections describe 10 examples of how to use the resource and its parameters.
Example Usage from GitHub
Type: "AWS::Cognito::IdentityPoolRoleAttachment"
Properties:
IdentityPoolId: !Ref IdentityPool
Roles:
authenticated: !GetAtt CognitoAuthorizedRole.Arn
Type: AWS::Cognito::IdentityPoolRoleAttachment
Properties:
IdentityPoolId:
Ref: CognitoIdentityPool
Roles:
authenticated:
Type: AWS::Cognito::IdentityPoolRoleAttachment
Properties:
IdentityPoolId:
Ref: CognitoIdentityPool
Roles:
authenticated:
Type: "AWS::Cognito::IdentityPoolRoleAttachment"
Properties:
IdentityPoolId: !Ref CognitoIdentityPool
Roles:
authenticated: !GetAtt CognitoAuthorizedRole.Arn
Type: AWS::Cognito::IdentityPoolRoleAttachment
Properties:
IdentityPoolId: { Ref: IdentityPool }
Roles:
"Type": "AWS::Cognito::IdentityPoolRoleAttachment",
"Properties": {
"IdentityPoolId": {
"Ref": "IdentityPoolStack"
},
"Roles": {
"Type": "AWS::Cognito::IdentityPoolRoleAttachment",
"Properties": {
"IdentityPoolId": {
"Ref": "IdentityPool"
},
"Roles": {
"Type": "AWS::Cognito::IdentityPoolRoleAttachment",
"Properties": {
"IdentityPoolId": {
"Ref": "CognitoIdentityPool"
},
"RoleMappings": {
"Type":"AWS::Cognito::IdentityPoolRoleAttachment",
"Properties":{
"IdentityPoolId":{
"Ref":"IdentityPool"
},
"Roles":{
"Type": "AWS::Cognito::IdentityPoolRoleAttachment",
"Properties": {
"IdentityPoolId": {
"Ref": "IdPool"
},
"Roles": {
Parameters
-
RoleMappingsoptional - Json -
IdentityPoolIdrequired - String -
Rolesoptional - Json
Explanation in CloudFormation Registry
The
AWS::Cognito::IdentityPoolRoleAttachmentresource manages the role configuration for an Amazon Cognito identity pool.
Frequently asked questions
What is AWS Amazon Cognito Identity Pool Roles Attachment?
AWS Amazon Cognito Identity Pool Roles Attachment is a resource for Amazon Cognito of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.
Where can I find the example code for the AWS Amazon Cognito Identity Pool Roles Attachment?
For Terraform, the dasmeta/terraform-aws-modules, ReeceRose/home-network-proxy and cloudveto/terraform-modules source code examples are useful. See the Terraform Example section for further details.
For CloudFormation, the Ankcorn/serverless-fullstack-example-app, geeksforinnovations/serverless_online_sastry and geeksforinnovations/Common-utilities source code examples are useful. See the CloudFormation Example section for further details.