

This is the new *CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html).

# Amazon Cognito
<a name="AWS_Cognito"></a>

**Resource types**
+ [AWS::Cognito::IdentityPool](aws-resource-cognito-identitypool.md)
+ [AWS::Cognito::IdentityPoolPrincipalTag](aws-resource-cognito-identitypoolprincipaltag.md)
+ [AWS::Cognito::IdentityPoolRoleAttachment](aws-resource-cognito-identitypoolroleattachment.md)
+ [AWS::Cognito::LogDeliveryConfiguration](aws-resource-cognito-logdeliveryconfiguration.md)
+ [AWS::Cognito::ManagedLoginBranding](aws-resource-cognito-managedloginbranding.md)
+ [AWS::Cognito::Terms](aws-resource-cognito-terms.md)
+ [AWS::Cognito::UserPool](aws-resource-cognito-userpool.md)
+ [AWS::Cognito::UserPoolClient](aws-resource-cognito-userpoolclient.md)
+ [AWS::Cognito::UserPoolDomain](aws-resource-cognito-userpooldomain.md)
+ [AWS::Cognito::UserPoolGroup](aws-resource-cognito-userpoolgroup.md)
+ [AWS::Cognito::UserPoolIdentityProvider](aws-resource-cognito-userpoolidentityprovider.md)
+ [AWS::Cognito::UserPoolResourceServer](aws-resource-cognito-userpoolresourceserver.md)
+ [AWS::Cognito::UserPoolRiskConfigurationAttachment](aws-resource-cognito-userpoolriskconfigurationattachment.md)
+ [AWS::Cognito::UserPoolUICustomizationAttachment](aws-resource-cognito-userpooluicustomizationattachment.md)
+ [AWS::Cognito::UserPoolUser](aws-resource-cognito-userpooluser.md)
+ [AWS::Cognito::UserPoolUserToGroupAttachment](aws-resource-cognito-userpoolusertogroupattachment.md)

# AWS::Cognito::IdentityPool
<a name="aws-resource-cognito-identitypool"></a>

The `AWS::Cognito::IdentityPool` resource creates an Amazon Cognito identity pool.

To avoid deleting the resource accidentally from CloudFormation, use [DeletionPolicy Attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html) and the [UpdateReplacePolicy Attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatereplacepolicy.html) to retain the resource on deletion or replacement.

## Syntax
<a name="aws-resource-cognito-identitypool-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-cognito-identitypool-syntax.json"></a>

```
{
  "Type" : "AWS::Cognito::IdentityPool",
  "Properties" : {
      "[AllowClassicFlow](#cfn-cognito-identitypool-allowclassicflow)" : Boolean,
      "[AllowUnauthenticatedIdentities](#cfn-cognito-identitypool-allowunauthenticatedidentities)" : Boolean,
      "[CognitoEvents](#cfn-cognito-identitypool-cognitoevents)" : Json,
      "[CognitoIdentityProviders](#cfn-cognito-identitypool-cognitoidentityproviders)" : [ CognitoIdentityProvider, ... ],
      "[CognitoStreams](#cfn-cognito-identitypool-cognitostreams)" : CognitoStreams,
      "[DeveloperProviderName](#cfn-cognito-identitypool-developerprovidername)" : String,
      "[IdentityPoolName](#cfn-cognito-identitypool-identitypoolname)" : String,
      "[IdentityPoolTags](#cfn-cognito-identitypool-identitypooltags)" : [ Tag, ... ],
      "[OpenIdConnectProviderARNs](#cfn-cognito-identitypool-openidconnectproviderarns)" : [ String, ... ],
      "[PushSync](#cfn-cognito-identitypool-pushsync)" : PushSync,
      "[SamlProviderARNs](#cfn-cognito-identitypool-samlproviderarns)" : [ String, ... ],
      "[SupportedLoginProviders](#cfn-cognito-identitypool-supportedloginproviders)" : Json
    }
}
```

### YAML
<a name="aws-resource-cognito-identitypool-syntax.yaml"></a>

```
Type: AWS::Cognito::IdentityPool
Properties:
  [AllowClassicFlow](#cfn-cognito-identitypool-allowclassicflow): Boolean
  [AllowUnauthenticatedIdentities](#cfn-cognito-identitypool-allowunauthenticatedidentities): Boolean
  [CognitoEvents](#cfn-cognito-identitypool-cognitoevents): Json
  [CognitoIdentityProviders](#cfn-cognito-identitypool-cognitoidentityproviders): 
    - CognitoIdentityProvider
  [CognitoStreams](#cfn-cognito-identitypool-cognitostreams): 
    CognitoStreams
  [DeveloperProviderName](#cfn-cognito-identitypool-developerprovidername): String
  [IdentityPoolName](#cfn-cognito-identitypool-identitypoolname): String
  [IdentityPoolTags](#cfn-cognito-identitypool-identitypooltags): 
    - Tag
  [OpenIdConnectProviderARNs](#cfn-cognito-identitypool-openidconnectproviderarns): 
    - String
  [PushSync](#cfn-cognito-identitypool-pushsync): 
    PushSync
  [SamlProviderARNs](#cfn-cognito-identitypool-samlproviderarns): 
    - String
  [SupportedLoginProviders](#cfn-cognito-identitypool-supportedloginproviders): Json
```

## Properties
<a name="aws-resource-cognito-identitypool-properties"></a>

`AllowClassicFlow`  <a name="cfn-cognito-identitypool-allowclassicflow"></a>
Enables the Basic (Classic) authentication flow.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AllowUnauthenticatedIdentities`  <a name="cfn-cognito-identitypool-allowunauthenticatedidentities"></a>
Specifies whether the identity pool supports unauthenticated logins.  
*Required*: Yes  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CognitoEvents`  <a name="cfn-cognito-identitypool-cognitoevents"></a>
The events to configure.  
*Required*: No  
*Type*: Json  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CognitoIdentityProviders`  <a name="cfn-cognito-identitypool-cognitoidentityproviders"></a>
The Amazon Cognito user pools and their client IDs.  
*Required*: No  
*Type*: Array of [CognitoIdentityProvider](aws-properties-cognito-identitypool-cognitoidentityprovider.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CognitoStreams`  <a name="cfn-cognito-identitypool-cognitostreams"></a>
Configuration options for configuring Amazon Cognito streams.  
*Required*: No  
*Type*: [CognitoStreams](aws-properties-cognito-identitypool-cognitostreams.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DeveloperProviderName`  <a name="cfn-cognito-identitypool-developerprovidername"></a>
The "domain" Amazon Cognito uses when referencing your users. This name acts as a placeholder that allows your backend and the Amazon Cognito service to communicate about the developer provider. For the `DeveloperProviderName`, you can use letters and periods (.), underscores (\$1), and dashes (-).  
*Minimum length*: 1  
*Maximum length*: 100  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`IdentityPoolName`  <a name="cfn-cognito-identitypool-identitypoolname"></a>
The name of your Amazon Cognito identity pool.  
*Minimum length*: 1  
*Maximum length*: 128  
*Pattern*: `[\w\s+=,.@-]+`  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`IdentityPoolTags`  <a name="cfn-cognito-identitypool-identitypooltags"></a>
Tags to assign to the identity pool. A tag is a label that you can apply to identity pools to categorize and manage them in different ways, such as by purpose, owner, environment, or other criteria.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-cognito-identitypool-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`OpenIdConnectProviderARNs`  <a name="cfn-cognito-identitypool-openidconnectproviderarns"></a>
The Amazon Resource Names (ARNs) of the OpenID connect providers.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PushSync`  <a name="cfn-cognito-identitypool-pushsync"></a>
The configuration options to be applied to the identity pool.  
*Required*: No  
*Type*: [PushSync](aws-properties-cognito-identitypool-pushsync.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SamlProviderARNs`  <a name="cfn-cognito-identitypool-samlproviderarns"></a>
The Amazon Resource Names (ARNs) of the Security Assertion Markup Language (SAML) providers.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SupportedLoginProviders`  <a name="cfn-cognito-identitypool-supportedloginproviders"></a>
Key-value pairs that map provider names to provider app IDs.  
*Required*: No  
*Type*: Json  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-cognito-identitypool-return-values"></a>

### Ref
<a name="aws-resource-cognito-identitypool-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the `IdentityPoolId`, such as `us-east-2:0d01f4d7-1305-4408-b437-12345EXAMPLE`.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-cognito-identitypool-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-cognito-identitypool-return-values-fn--getatt-fn--getatt"></a>

`Name`  <a name="Name-fn::getatt"></a>
The name of the Amazon Cognito identity pool, returned as a string.

# AWS::Cognito::IdentityPool CognitoIdentityProvider
<a name="aws-properties-cognito-identitypool-cognitoidentityprovider"></a>

`CognitoIdentityProvider` is a property of the [AWS::Cognito::IdentityPool](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-identitypool.html) resource that represents an Amazon Cognito user pool and its client ID.

## Syntax
<a name="aws-properties-cognito-identitypool-cognitoidentityprovider-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-identitypool-cognitoidentityprovider-syntax.json"></a>

```
{
  "[ClientId](#cfn-cognito-identitypool-cognitoidentityprovider-clientid)" : String,
  "[ProviderName](#cfn-cognito-identitypool-cognitoidentityprovider-providername)" : String,
  "[ServerSideTokenCheck](#cfn-cognito-identitypool-cognitoidentityprovider-serversidetokencheck)" : Boolean
}
```

### YAML
<a name="aws-properties-cognito-identitypool-cognitoidentityprovider-syntax.yaml"></a>

```
  [ClientId](#cfn-cognito-identitypool-cognitoidentityprovider-clientid): String
  [ProviderName](#cfn-cognito-identitypool-cognitoidentityprovider-providername): String
  [ServerSideTokenCheck](#cfn-cognito-identitypool-cognitoidentityprovider-serversidetokencheck): Boolean
```

## Properties
<a name="aws-properties-cognito-identitypool-cognitoidentityprovider-properties"></a>

`ClientId`  <a name="cfn-cognito-identitypool-cognitoidentityprovider-clientid"></a>
The client ID for the Amazon Cognito user pool.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ProviderName`  <a name="cfn-cognito-identitypool-cognitoidentityprovider-providername"></a>
The provider name for an Amazon Cognito user pool. For example: `cognito-idp.us-east-2.amazonaws.com/us-east-2_123456789`.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ServerSideTokenCheck`  <a name="cfn-cognito-identitypool-cognitoidentityprovider-serversidetokencheck"></a>
TRUE if server-side token validation is enabled for the identity provider’s token.  
After you set the `ServerSideTokenCheck` to TRUE for an identity pool, that identity pool checks with the integrated user pools to make sure the user has not been globally signed out or deleted before the identity pool provides an OIDC token or AWS credentials for the user.  
If the user is signed out or deleted, the identity pool returns a 400 Not Authorized error.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::IdentityPool CognitoStreams
<a name="aws-properties-cognito-identitypool-cognitostreams"></a>

`CognitoStreams` is a property of the [AWS::Cognito::IdentityPool](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-identitypool.html) resource that defines configuration options for Amazon Cognito streams.

## Syntax
<a name="aws-properties-cognito-identitypool-cognitostreams-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-identitypool-cognitostreams-syntax.json"></a>

```
{
  "[RoleArn](#cfn-cognito-identitypool-cognitostreams-rolearn)" : String,
  "[StreamingStatus](#cfn-cognito-identitypool-cognitostreams-streamingstatus)" : String,
  "[StreamName](#cfn-cognito-identitypool-cognitostreams-streamname)" : String
}
```

### YAML
<a name="aws-properties-cognito-identitypool-cognitostreams-syntax.yaml"></a>

```
  [RoleArn](#cfn-cognito-identitypool-cognitostreams-rolearn): String
  [StreamingStatus](#cfn-cognito-identitypool-cognitostreams-streamingstatus): String
  [StreamName](#cfn-cognito-identitypool-cognitostreams-streamname): String
```

## Properties
<a name="aws-properties-cognito-identitypool-cognitostreams-properties"></a>

`RoleArn`  <a name="cfn-cognito-identitypool-cognitostreams-rolearn"></a>
The Amazon Resource Name (ARN) of the role Amazon Cognito can assume to publish to the stream. This role must grant access to Amazon Cognito (cognito-sync) to invoke `PutRecord` on your Amazon Cognito stream.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`StreamingStatus`  <a name="cfn-cognito-identitypool-cognitostreams-streamingstatus"></a>
Status of the Amazon Cognito streams. Valid values are: `ENABLED` or `DISABLED`.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`StreamName`  <a name="cfn-cognito-identitypool-cognitostreams-streamname"></a>
The name of the Amazon Cognito stream to receive updates. This stream must be in the developer's account and in the same Region as the identity pool.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::IdentityPool PushSync
<a name="aws-properties-cognito-identitypool-pushsync"></a>

`PushSync` is a property of the [AWS::Cognito::IdentityPool](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-identitypool.html) resource that defines the configuration options to be applied to an Amazon Cognito identity pool.

## Syntax
<a name="aws-properties-cognito-identitypool-pushsync-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-identitypool-pushsync-syntax.json"></a>

```
{
  "[ApplicationArns](#cfn-cognito-identitypool-pushsync-applicationarns)" : [ String, ... ],
  "[RoleArn](#cfn-cognito-identitypool-pushsync-rolearn)" : String
}
```

### YAML
<a name="aws-properties-cognito-identitypool-pushsync-syntax.yaml"></a>

```
  [ApplicationArns](#cfn-cognito-identitypool-pushsync-applicationarns): 
    - String
  [RoleArn](#cfn-cognito-identitypool-pushsync-rolearn): String
```

## Properties
<a name="aws-properties-cognito-identitypool-pushsync-properties"></a>

`ApplicationArns`  <a name="cfn-cognito-identitypool-pushsync-applicationarns"></a>
The ARNs of the Amazon SNS platform applications that could be used by clients.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleArn`  <a name="cfn-cognito-identitypool-pushsync-rolearn"></a>
An IAM role configured to allow Amazon Cognito to call Amazon SNS on behalf of the developer.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::IdentityPool Tag
<a name="aws-properties-cognito-identitypool-tag"></a>

<a name="aws-properties-cognito-identitypool-tag-description"></a>The `Tag` property type specifies Property description not available. for an [AWS::Cognito::IdentityPool](aws-resource-cognito-identitypool.md).

## Syntax
<a name="aws-properties-cognito-identitypool-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-identitypool-tag-syntax.json"></a>

```
{
  "[Key](#cfn-cognito-identitypool-tag-key)" : String,
  "[Value](#cfn-cognito-identitypool-tag-value)" : String
}
```

### YAML
<a name="aws-properties-cognito-identitypool-tag-syntax.yaml"></a>

```
  [Key](#cfn-cognito-identitypool-tag-key): String
  [Value](#cfn-cognito-identitypool-tag-value): String
```

## Properties
<a name="aws-properties-cognito-identitypool-tag-properties"></a>

`Key`  <a name="cfn-cognito-identitypool-tag-key"></a>
Property description not available.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-cognito-identitypool-tag-value"></a>
Property description not available.  
*Required*: Yes  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::IdentityPoolPrincipalTag
<a name="aws-resource-cognito-identitypoolprincipaltag"></a>

A list of the identity pool principal tag assignments for attributes for access control.

## Syntax
<a name="aws-resource-cognito-identitypoolprincipaltag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-cognito-identitypoolprincipaltag-syntax.json"></a>

```
{
  "Type" : "AWS::Cognito::IdentityPoolPrincipalTag",
  "Properties" : {
      "[IdentityPoolId](#cfn-cognito-identitypoolprincipaltag-identitypoolid)" : String,
      "[IdentityProviderName](#cfn-cognito-identitypoolprincipaltag-identityprovidername)" : String,
      "[PrincipalTags](#cfn-cognito-identitypoolprincipaltag-principaltags)" : Json,
      "[UseDefaults](#cfn-cognito-identitypoolprincipaltag-usedefaults)" : Boolean
    }
}
```

### YAML
<a name="aws-resource-cognito-identitypoolprincipaltag-syntax.yaml"></a>

```
Type: AWS::Cognito::IdentityPoolPrincipalTag
Properties:
  [IdentityPoolId](#cfn-cognito-identitypoolprincipaltag-identitypoolid): String
  [IdentityProviderName](#cfn-cognito-identitypoolprincipaltag-identityprovidername): String
  [PrincipalTags](#cfn-cognito-identitypoolprincipaltag-principaltags): Json
  [UseDefaults](#cfn-cognito-identitypoolprincipaltag-usedefaults): Boolean
```

## Properties
<a name="aws-resource-cognito-identitypoolprincipaltag-properties"></a>

`IdentityPoolId`  <a name="cfn-cognito-identitypoolprincipaltag-identitypoolid"></a>
The identity pool that you want to associate with this principal tag map.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`IdentityProviderName`  <a name="cfn-cognito-identitypoolprincipaltag-identityprovidername"></a>
The identity pool identity provider (IdP) that you want to associate with this principal tag map.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`PrincipalTags`  <a name="cfn-cognito-identitypoolprincipaltag-principaltags"></a>
A JSON-formatted list of user claims and the principal tags that you want to associate with them. When Amazon Cognito requests credentials, it sets the value of the principal tag to the value of the user's claim.  
*Required*: No  
*Type*: Json  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`UseDefaults`  <a name="cfn-cognito-identitypoolprincipaltag-usedefaults"></a>
Use a default set of mappings between claims and tags for this provider, instead of a custom map.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-cognito-identitypoolprincipaltag-return-values"></a>

### Ref
<a name="aws-resource-cognito-identitypoolprincipaltag-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the principal tag primary ID, like `us-east-1:1cf667a2-49a6-454b-9e45-23199EXAMPLE|graph.facebook.com`.

## Examples
<a name="aws-resource-cognito-identitypoolprincipaltag--examples"></a>



### Creating a new principal tag attribute map for an identity pool
<a name="aws-resource-cognito-identitypoolprincipaltag--examples--Creating_a_new_principal_tag_attribute_map_for_an_identity_pool"></a>

The following example maps the claim `aud` to principal tag `app_id` and the claim `sub` to `user_id` in the identity pool `Example_pool.`

#### YAML
<a name="aws-resource-cognito-identitypoolprincipaltag--examples--Creating_a_new_principal_tag_attribute_map_for_an_identity_pool--yaml"></a>

```
AWSTemplateFormatVersion: 2010-09-09
Description: Cognito Principal Tags Example
Resources:
  ExamplePool:
    Type: AWS::Cognito::IdentityPool
    Properties:
      IdentityPoolName: example_pool
      AllowUnauthenticatedIdentities: true
      SupportedLoginProviders:
        graph.facebook.com: abcdExampleClientId
  PrincipalTags:
    Type: AWS::Cognito::IdentityPoolPrincipalTag
    Properties:
      IdentityPoolId: !Ref ExamplePool
      IdentityProviderName: graph.facebook.com
      PrincipalTags:
        app_id: aud
        user_id: sub
      UseDefaults: false
```

# AWS::Cognito::IdentityPoolRoleAttachment
<a name="aws-resource-cognito-identitypoolroleattachment"></a>

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

## Syntax
<a name="aws-resource-cognito-identitypoolroleattachment-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-cognito-identitypoolroleattachment-syntax.json"></a>

```
{
  "Type" : "AWS::Cognito::IdentityPoolRoleAttachment",
  "Properties" : {
      "[IdentityPoolId](#cfn-cognito-identitypoolroleattachment-identitypoolid)" : String,
      "[RoleMappings](#cfn-cognito-identitypoolroleattachment-rolemappings)" : RoleMapping,
      "[Roles](#cfn-cognito-identitypoolroleattachment-roles)" : String
    }
}
```

### YAML
<a name="aws-resource-cognito-identitypoolroleattachment-syntax.yaml"></a>

```
Type: AWS::Cognito::IdentityPoolRoleAttachment
Properties:
  [IdentityPoolId](#cfn-cognito-identitypoolroleattachment-identitypoolid): String
  [RoleMappings](#cfn-cognito-identitypoolroleattachment-rolemappings): 
    RoleMapping
  [Roles](#cfn-cognito-identitypoolroleattachment-roles): String
```

## Properties
<a name="aws-resource-cognito-identitypoolroleattachment-properties"></a>

`IdentityPoolId`  <a name="cfn-cognito-identitypoolroleattachment-identitypoolid"></a>
An identity pool ID in the format `REGION:GUID`.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`RoleMappings`  <a name="cfn-cognito-identitypoolroleattachment-rolemappings"></a>
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).  
*Required*: No  
*Type*: [RoleMapping](aws-properties-cognito-identitypoolroleattachment-rolemapping.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Roles`  <a name="cfn-cognito-identitypoolroleattachment-roles"></a>
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.  
*Required*: No  
*Type*: String  
*Pattern*: `^.+$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-cognito-identitypoolroleattachment-return-values"></a>

### Ref
<a name="aws-resource-cognito-identitypoolroleattachment-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the `IdentityPoolId`, such as `us-east-2:0d01f4d7-1305-4408-b437-12345EXAMPLE`.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-cognito-identitypoolroleattachment-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-cognito-identitypoolroleattachment-return-values-fn--getatt-fn--getatt"></a>

`Id`  <a name="Id-fn::getatt"></a>
The resource ID.

## Examples
<a name="aws-resource-cognito-identitypoolroleattachment--examples"></a>



### Setting the roles for an identity pool
<a name="aws-resource-cognito-identitypoolroleattachment--examples--Setting_the_roles_for_an_identity_pool"></a>

The following example sets roles for an identity pool. It sets “authenticated” and “unauthenticated” roles and maps two identity providers to them. The first identity provider is “graph.facebook.com”. The second is using a reference to set the identity provider name.

#### JSON
<a name="aws-resource-cognito-identitypoolroleattachment--examples--Setting_the_roles_for_an_identity_pool--json"></a>

```
{
   "IdentityPoolRoleAttachment":{
      "Type":"AWS::Cognito::IdentityPoolRoleAttachment",
      "Properties":{
         "IdentityPoolId":{
            "Ref":"IdentityPool"
         },
         "Roles":{
            "authenticated":{
               "Fn::GetAtt":[
                  "AuthenticatedRole",
                  "Arn"
               ]
            },
            "unauthenticated":{
               "Fn::GetAtt":[
                  "UnAuthenticatedRole",
                  "Arn"
               ]
            }
         },
         "RoleMappings":{
            "graph.facebook.com":{
               "IdentityProvider":"graph.facebook.com",
               "AmbiguousRoleResolution":"Deny",
               "Type":"Rules",
               "RulesConfiguration":{
                  "Rules":[
                     {
                        "Claim":"sub",
                        "MatchType":"Equals",
                        "RoleARN":{
                           "Fn::GetAtt":[
                              "AuthenticatedRole",
                              "Arn"
                           ]
                        },
                        "Value":"goodvalue"
                     }
                  ]
               }
            },
            "userpool1":{
               "IdentityProvider":{
                  "Ref":"CognitoUserPool"
               },
               "AmbiguousRoleResolution":"Deny",
               "Type":"Rules",
               "RulesConfiguration":{
                  "Rules":[
                     {
                        "Claim":"sub",
                        "MatchType":"Equals",
                        "RoleARN":{
                           "Fn::GetAtt":[
                              "AuthenticatedRole",
                              "Arn"
                           ]
                        },
                        "Value":"goodvalue"
                     }
                  ]
               }
            }
         }
      }
   }
}
```

#### YAML
<a name="aws-resource-cognito-identitypoolroleattachment--examples--Setting_the_roles_for_an_identity_pool--yaml"></a>

```
IdentityPoolRoleAttachment: 
  Type: AWS::Cognito::IdentityPoolRoleAttachment 
  Properties: 
    IdentityPoolId: !Ref IdentityPool
    Roles: 
      "authenticated": !GetAtt AuthenticatedRole.Arn 
      "unauthenticated": !GetAtt UnAuthenticatedRole.Arn 
    RoleMappings:  
      "graph.facebook.com":
        IdentityProvider: "graph.facebook.com" 
        AmbiguousRoleResolution: Deny 
        Type: Rules 
        RulesConfiguration: 
          Rules: 
            - Claim: "sub" 
              MatchType: "Equals" 
              RoleARN: !GetAtt AuthenticatedRole.Arn 
              Value: "goodvalue"
      "userpool1": 
        IdentityProvider: !Ref CognitoUserPool 
        AmbiguousRoleResolution: Deny 
        Type: Rules 
        RulesConfiguration: 
          Rules: 
            - Claim: "sub" 
              MatchType: "Equals" 
              RoleARN: !GetAtt AuthenticatedRole.Arn 
              Value: "goodvalue"
```

# AWS::Cognito::IdentityPoolRoleAttachment MappingRule
<a name="aws-properties-cognito-identitypoolroleattachment-mappingrule"></a>

Defines how to map a claim to a role ARN.

## Syntax
<a name="aws-properties-cognito-identitypoolroleattachment-mappingrule-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-identitypoolroleattachment-mappingrule-syntax.json"></a>

```
{
  "[Claim](#cfn-cognito-identitypoolroleattachment-mappingrule-claim)" : String,
  "[MatchType](#cfn-cognito-identitypoolroleattachment-mappingrule-matchtype)" : String,
  "[RoleARN](#cfn-cognito-identitypoolroleattachment-mappingrule-rolearn)" : String,
  "[Value](#cfn-cognito-identitypoolroleattachment-mappingrule-value)" : String
}
```

### YAML
<a name="aws-properties-cognito-identitypoolroleattachment-mappingrule-syntax.yaml"></a>

```
  [Claim](#cfn-cognito-identitypoolroleattachment-mappingrule-claim): String
  [MatchType](#cfn-cognito-identitypoolroleattachment-mappingrule-matchtype): String
  [RoleARN](#cfn-cognito-identitypoolroleattachment-mappingrule-rolearn): String
  [Value](#cfn-cognito-identitypoolroleattachment-mappingrule-value): String
```

## Properties
<a name="aws-properties-cognito-identitypoolroleattachment-mappingrule-properties"></a>

`Claim`  <a name="cfn-cognito-identitypoolroleattachment-mappingrule-claim"></a>
The claim name that must be present in the token. For example: "isAdmin" or "paid".  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MatchType`  <a name="cfn-cognito-identitypoolroleattachment-mappingrule-matchtype"></a>
The match condition that specifies how closely the claim value in the IdP token must match `Value`.  
Valid values are: `Equals`, `Contains`, `StartsWith`, and `NotEqual`.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleARN`  <a name="cfn-cognito-identitypoolroleattachment-mappingrule-rolearn"></a>
The Amazon Resource Name (ARN) of the role.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-cognito-identitypoolroleattachment-mappingrule-value"></a>
A brief string that the claim must match. For example, "paid" or "yes".  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::IdentityPoolRoleAttachment RoleMapping
<a name="aws-properties-cognito-identitypoolroleattachment-rolemapping"></a>

One of a set of `RoleMappings`, a property of the [AWS::Cognito::IdentityPoolRoleAttachment](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-identitypoolroleattachment.html) resource that defines the role-mapping attributes of an Amazon Cognito identity pool.

## Syntax
<a name="aws-properties-cognito-identitypoolroleattachment-rolemapping-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-identitypoolroleattachment-rolemapping-syntax.json"></a>

```
{
  "[AmbiguousRoleResolution](#cfn-cognito-identitypoolroleattachment-rolemapping-ambiguousroleresolution)" : String,
  "[IdentityProvider](#cfn-cognito-identitypoolroleattachment-rolemapping-identityprovider)" : String,
  "[RulesConfiguration](#cfn-cognito-identitypoolroleattachment-rolemapping-rulesconfiguration)" : RulesConfigurationType,
  "[Type](#cfn-cognito-identitypoolroleattachment-rolemapping-type)" : String
}
```

### YAML
<a name="aws-properties-cognito-identitypoolroleattachment-rolemapping-syntax.yaml"></a>

```
  [AmbiguousRoleResolution](#cfn-cognito-identitypoolroleattachment-rolemapping-ambiguousroleresolution): String
  [IdentityProvider](#cfn-cognito-identitypoolroleattachment-rolemapping-identityprovider): String
  [RulesConfiguration](#cfn-cognito-identitypoolroleattachment-rolemapping-rulesconfiguration): 
    RulesConfigurationType
  [Type](#cfn-cognito-identitypoolroleattachment-rolemapping-type): String
```

## Properties
<a name="aws-properties-cognito-identitypoolroleattachment-rolemapping-properties"></a>

`AmbiguousRoleResolution`  <a name="cfn-cognito-identitypoolroleattachment-rolemapping-ambiguousroleresolution"></a>
If you specify Token or Rules as the `Type`, `AmbiguousRoleResolution` is required.  
Specifies the action to be taken if either no rules match the claim value for the `Rules` type, or there is no `cognito:preferred_role` claim and there are multiple `cognito:roles` matches for the `Token` type.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`IdentityProvider`  <a name="cfn-cognito-identitypoolroleattachment-rolemapping-identityprovider"></a>
Identifier for the identity provider for which the role is mapped. For example: `graph.facebook.com` or `cognito-idp.us-east-1.amazonaws.com/us-east-1_abcdefghi:app_client_id (http://cognito-idp.us-east-1.amazonaws.com/us-east-1_abcdefghi:app_client_id)`. This is the identity provider that is used by the user for authentication.  
If the identity provider property isn't provided, the key of the entry in the `RoleMappings` map is used as the identity provider.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RulesConfiguration`  <a name="cfn-cognito-identitypoolroleattachment-rolemapping-rulesconfiguration"></a>
The rules to be used for mapping users to roles. If you specify "Rules" as the role-mapping type, RulesConfiguration is required.  
*Required*: No  
*Type*: [RulesConfigurationType](aws-properties-cognito-identitypoolroleattachment-rulesconfigurationtype.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Type`  <a name="cfn-cognito-identitypoolroleattachment-rolemapping-type"></a>
The role mapping type. Token will use `cognito:roles` and `cognito:preferred_role` claims from the Cognito identity provider token to map groups to roles. Rules will attempt to match claims from the token to map to a role.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::IdentityPoolRoleAttachment RulesConfigurationType
<a name="aws-properties-cognito-identitypoolroleattachment-rulesconfigurationtype"></a>

`RulesConfigurationType` is a subproperty of the [RoleMapping](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-identitypoolroleattachment-rolemapping.html) property that defines the rules to be used for mapping users to roles.

## Syntax
<a name="aws-properties-cognito-identitypoolroleattachment-rulesconfigurationtype-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-identitypoolroleattachment-rulesconfigurationtype-syntax.json"></a>

```
{
  "[Rules](#cfn-cognito-identitypoolroleattachment-rulesconfigurationtype-rules)" : [ MappingRule, ... ]
}
```

### YAML
<a name="aws-properties-cognito-identitypoolroleattachment-rulesconfigurationtype-syntax.yaml"></a>

```
  [Rules](#cfn-cognito-identitypoolroleattachment-rulesconfigurationtype-rules): 
    - MappingRule
```

## Properties
<a name="aws-properties-cognito-identitypoolroleattachment-rulesconfigurationtype-properties"></a>

`Rules`  <a name="cfn-cognito-identitypoolroleattachment-rulesconfigurationtype-rules"></a>
The rules. You can specify up to 25 rules per identity provider.  
*Required*: Yes  
*Type*: Array of [MappingRule](aws-properties-cognito-identitypoolroleattachment-mappingrule.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::LogDeliveryConfiguration
<a name="aws-resource-cognito-logdeliveryconfiguration"></a>

Sets up or modifies the logging configuration of a user pool. User pools can export user notification logs and, when threat protection is active, user-activity logs. For more information, see [Exporting user pool logs](https://docs.aws.amazon.com/cognito/latest/developerguide/exporting-quotas-and-usage.html).

## Syntax
<a name="aws-resource-cognito-logdeliveryconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-cognito-logdeliveryconfiguration-syntax.json"></a>

```
{
  "Type" : "AWS::Cognito::LogDeliveryConfiguration",
  "Properties" : {
      "[LogConfigurations](#cfn-cognito-logdeliveryconfiguration-logconfigurations)" : [ LogConfiguration, ... ],
      "[UserPoolId](#cfn-cognito-logdeliveryconfiguration-userpoolid)" : String
    }
}
```

### YAML
<a name="aws-resource-cognito-logdeliveryconfiguration-syntax.yaml"></a>

```
Type: AWS::Cognito::LogDeliveryConfiguration
Properties:
  [LogConfigurations](#cfn-cognito-logdeliveryconfiguration-logconfigurations): 
    - LogConfiguration
  [UserPoolId](#cfn-cognito-logdeliveryconfiguration-userpoolid): String
```

## Properties
<a name="aws-resource-cognito-logdeliveryconfiguration-properties"></a>

`LogConfigurations`  <a name="cfn-cognito-logdeliveryconfiguration-logconfigurations"></a>
A logging destination of a user pool. User pools can have multiple logging destinations for message-delivery and user-activity logs.  
*Required*: No  
*Type*: Array of [LogConfiguration](aws-properties-cognito-logdeliveryconfiguration-logconfiguration.md)  
*Minimum*: `0`  
*Maximum*: `2`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`UserPoolId`  <a name="cfn-cognito-logdeliveryconfiguration-userpoolid"></a>
The ID of the user pool where you configured logging.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[\w-]+_[0-9a-zA-Z]+`  
*Minimum*: `1`  
*Maximum*: `55`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-cognito-logdeliveryconfiguration-return-values"></a>

### Ref
<a name="aws-resource-cognito-logdeliveryconfiguration-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns a resource identifier. A log delivery configuration attached to a user pool returns a user pool ID like `us-east-1_EXAMPLE`.

### Fn::GetAtt
<a name="aws-resource-cognito-logdeliveryconfiguration-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-cognito-logdeliveryconfiguration-return-values-fn--getatt-fn--getatt"></a>

`Id`  <a name="Id-fn::getatt"></a>
A user pool ID, for example `us-east-1_EXAMPLE`.

## Examples
<a name="aws-resource-cognito-logdeliveryconfiguration--examples"></a>



### Creating a new log delivery configuration for a user pool
<a name="aws-resource-cognito-logdeliveryconfiguration--examples--Creating_a_new_log_delivery_configuration_for_a_user_pool"></a>

The following example creates log delivery of user message-delivery errors to a log group and threat-protection logs to a stream.

#### JSON
<a name="aws-resource-cognito-logdeliveryconfiguration--examples--Creating_a_new_log_delivery_configuration_for_a_user_pool--json"></a>

```
{
    "LogDeliveryConfiguration": {
        "Properties": {
            "LogConfigurations": [
                {
                    "CloudWatchLogsConfiguration": {
                        "LogGroupArn": "arn:aws:logs:us-west-2:123456789012:log-group:cognito-exported"
                    },
                    "EventSource": "userNotification",
                    "LogLevel": "ERROR"
                },
                {
                    "EventSource": "userAuthEvents",
                    "FirehoseConfiguration": {
                        "StreamArn": "arn:aws:firehose:us-west-2:123456789012:deliverystream/test-deliverystream"
                    },
                    "LogLevel": "INFO"
                }
            ],
            "UserPoolId": "us-west-2_EXAMPLE"
        },
        "Type": "AWS::Cognito::LogDeliveryConfiguration"
    }
}
```

#### YAML
<a name="aws-resource-cognito-logdeliveryconfiguration--examples--Creating_a_new_log_delivery_configuration_for_a_user_pool--yaml"></a>

```
LogDeliveryConfiguration:
    Type: AWS::Cognito::LogDeliveryConfiguration
    Properties:
      LogConfigurations:
        - CloudWatchLogsConfiguration:
            LogGroupArn: arn:aws:logs:us-west-2:123456789012:log-group:cognito-exported
          EventSource: userNotification
          LogLevel: ERROR
        - EventSource: userAuthEvents
          FirehoseConfiguration:
            StreamArn: arn:aws:firehose:us-west-2:123456789012:deliverystream/test-deliverystream
          LogLevel: INFO
      UserPoolId: us-west-2_EXAMPLE
```

# AWS::Cognito::LogDeliveryConfiguration CloudWatchLogsConfiguration
<a name="aws-properties-cognito-logdeliveryconfiguration-cloudwatchlogsconfiguration"></a>

Configuration for the CloudWatch log group destination of user pool detailed activity logging, or of user activity log export with advanced security features.

## Syntax
<a name="aws-properties-cognito-logdeliveryconfiguration-cloudwatchlogsconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-logdeliveryconfiguration-cloudwatchlogsconfiguration-syntax.json"></a>

```
{
  "[LogGroupArn](#cfn-cognito-logdeliveryconfiguration-cloudwatchlogsconfiguration-loggrouparn)" : String
}
```

### YAML
<a name="aws-properties-cognito-logdeliveryconfiguration-cloudwatchlogsconfiguration-syntax.yaml"></a>

```
  [LogGroupArn](#cfn-cognito-logdeliveryconfiguration-cloudwatchlogsconfiguration-loggrouparn): String
```

## Properties
<a name="aws-properties-cognito-logdeliveryconfiguration-cloudwatchlogsconfiguration-properties"></a>

`LogGroupArn`  <a name="cfn-cognito-logdeliveryconfiguration-cloudwatchlogsconfiguration-loggrouparn"></a>
The Amazon Resource Name (arn) of a CloudWatch Logs log group where your user pool sends logs. The log group must not be encrypted with AWS Key Management Service and must be in the same AWS account as your user pool.  
To send logs to log groups with a resource policy of a size greater than 5120 characters, configure a log group with a path that starts with `/aws/vendedlogs`. For more information, see [Enabling logging from certain AWS services](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html).  
*Required*: No  
*Type*: String  
*Pattern*: `arn:[\w+=/,.@-]+:[\w+=/,.@-]+:([\w+=/,.@-]*)?:[0-9]+:[\w+=/,.@-]+(:[\w+=/,.@-]+)?(:[\w+=/,.@-]+)?`  
*Minimum*: `20`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::LogDeliveryConfiguration FirehoseConfiguration
<a name="aws-properties-cognito-logdeliveryconfiguration-firehoseconfiguration"></a>

Configuration for the Amazon Data Firehose stream destination of user activity log export with threat protection.

## Syntax
<a name="aws-properties-cognito-logdeliveryconfiguration-firehoseconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-logdeliveryconfiguration-firehoseconfiguration-syntax.json"></a>

```
{
  "[StreamArn](#cfn-cognito-logdeliveryconfiguration-firehoseconfiguration-streamarn)" : String
}
```

### YAML
<a name="aws-properties-cognito-logdeliveryconfiguration-firehoseconfiguration-syntax.yaml"></a>

```
  [StreamArn](#cfn-cognito-logdeliveryconfiguration-firehoseconfiguration-streamarn): String
```

## Properties
<a name="aws-properties-cognito-logdeliveryconfiguration-firehoseconfiguration-properties"></a>

`StreamArn`  <a name="cfn-cognito-logdeliveryconfiguration-firehoseconfiguration-streamarn"></a>
The ARN of an Amazon Data Firehose stream that's the destination for threat protection log export.  
*Required*: No  
*Type*: String  
*Pattern*: `arn:[\w+=/,.@-]+:[\w+=/,.@-]+:([\w+=/,.@-]*)?:[0-9]+:[\w+=/,.@-]+(:[\w+=/,.@-]+)?(:[\w+=/,.@-]+)?`  
*Minimum*: `20`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::LogDeliveryConfiguration LogConfiguration
<a name="aws-properties-cognito-logdeliveryconfiguration-logconfiguration"></a>

The configuration of user event logs to an external AWS service like Amazon Data Firehose, Amazon S3, or Amazon CloudWatch Logs.

## Syntax
<a name="aws-properties-cognito-logdeliveryconfiguration-logconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-logdeliveryconfiguration-logconfiguration-syntax.json"></a>

```
{
  "[CloudWatchLogsConfiguration](#cfn-cognito-logdeliveryconfiguration-logconfiguration-cloudwatchlogsconfiguration)" : CloudWatchLogsConfiguration,
  "[EventSource](#cfn-cognito-logdeliveryconfiguration-logconfiguration-eventsource)" : String,
  "[FirehoseConfiguration](#cfn-cognito-logdeliveryconfiguration-logconfiguration-firehoseconfiguration)" : FirehoseConfiguration,
  "[LogLevel](#cfn-cognito-logdeliveryconfiguration-logconfiguration-loglevel)" : String,
  "[S3Configuration](#cfn-cognito-logdeliveryconfiguration-logconfiguration-s3configuration)" : S3Configuration
}
```

### YAML
<a name="aws-properties-cognito-logdeliveryconfiguration-logconfiguration-syntax.yaml"></a>

```
  [CloudWatchLogsConfiguration](#cfn-cognito-logdeliveryconfiguration-logconfiguration-cloudwatchlogsconfiguration): 
    CloudWatchLogsConfiguration
  [EventSource](#cfn-cognito-logdeliveryconfiguration-logconfiguration-eventsource): String
  [FirehoseConfiguration](#cfn-cognito-logdeliveryconfiguration-logconfiguration-firehoseconfiguration): 
    FirehoseConfiguration
  [LogLevel](#cfn-cognito-logdeliveryconfiguration-logconfiguration-loglevel): String
  [S3Configuration](#cfn-cognito-logdeliveryconfiguration-logconfiguration-s3configuration): 
    S3Configuration
```

## Properties
<a name="aws-properties-cognito-logdeliveryconfiguration-logconfiguration-properties"></a>

`CloudWatchLogsConfiguration`  <a name="cfn-cognito-logdeliveryconfiguration-logconfiguration-cloudwatchlogsconfiguration"></a>
Configuration for the CloudWatch log group destination of user pool detailed activity logging, or of user activity log export with advanced security features.  
*Required*: No  
*Type*: [CloudWatchLogsConfiguration](aws-properties-cognito-logdeliveryconfiguration-cloudwatchlogsconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EventSource`  <a name="cfn-cognito-logdeliveryconfiguration-logconfiguration-eventsource"></a>
The source of events that your user pool sends for logging. To send error-level logs about user notification activity, set to `userNotification`. To send info-level logs about threat-protection user activity in user pools with the Plus feature plan, set to `userAuthEvents`.  
*Required*: No  
*Type*: String  
*Allowed values*: `userNotification | userAuthEvents`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`FirehoseConfiguration`  <a name="cfn-cognito-logdeliveryconfiguration-logconfiguration-firehoseconfiguration"></a>
Configuration for the Amazon Data Firehose stream destination of user activity log export with threat protection.  
*Required*: No  
*Type*: [FirehoseConfiguration](aws-properties-cognito-logdeliveryconfiguration-firehoseconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LogLevel`  <a name="cfn-cognito-logdeliveryconfiguration-logconfiguration-loglevel"></a>
The `errorlevel` selection of logs that a user pool sends for detailed activity logging. To send `userNotification` activity with [information about message delivery](https://docs.aws.amazon.com/cognito/latest/developerguide/exporting-quotas-and-usage.html), choose `ERROR` with `CloudWatchLogsConfiguration`. To send `userAuthEvents` activity with user logs from threat protection with the Plus feature plan, choose `INFO` with one of `CloudWatchLogsConfiguration`, `FirehoseConfiguration`, or `S3Configuration`.  
*Required*: No  
*Type*: String  
*Allowed values*: `ERROR | INFO`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`S3Configuration`  <a name="cfn-cognito-logdeliveryconfiguration-logconfiguration-s3configuration"></a>
Configuration for the Amazon S3 bucket destination of user activity log export with threat protection.  
*Required*: No  
*Type*: [S3Configuration](aws-properties-cognito-logdeliveryconfiguration-s3configuration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::LogDeliveryConfiguration S3Configuration
<a name="aws-properties-cognito-logdeliveryconfiguration-s3configuration"></a>

Configuration for the Amazon S3 bucket destination of user activity log export with threat protection.

## Syntax
<a name="aws-properties-cognito-logdeliveryconfiguration-s3configuration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-logdeliveryconfiguration-s3configuration-syntax.json"></a>

```
{
  "[BucketArn](#cfn-cognito-logdeliveryconfiguration-s3configuration-bucketarn)" : String
}
```

### YAML
<a name="aws-properties-cognito-logdeliveryconfiguration-s3configuration-syntax.yaml"></a>

```
  [BucketArn](#cfn-cognito-logdeliveryconfiguration-s3configuration-bucketarn): String
```

## Properties
<a name="aws-properties-cognito-logdeliveryconfiguration-s3configuration-properties"></a>

`BucketArn`  <a name="cfn-cognito-logdeliveryconfiguration-s3configuration-bucketarn"></a>
The ARN of an Amazon S3 bucket that's the destination for threat protection log export.  
*Required*: No  
*Type*: String  
*Pattern*: `arn:[\w+=/,.@-]+:[\w+=/,.@-]+:::[\w+=/,.@-]+(:[\w+=/,.@-]+)?(:[\w+=/,.@-]+)?`  
*Minimum*: `3`  
*Maximum*: `1024`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::ManagedLoginBranding
<a name="aws-resource-cognito-managedloginbranding"></a>

Creates a new set of branding settings for a user pool style and associates it with an app client. This operation is the programmatic option for the creation of a new style in the branding designer.

Provides values for UI customization in a `Settings` JSON object and image files in an `Assets` array. To send the JSON object `Document` type parameter in `Settings`, you might need to update to the most recent version of your AWS SDK. 

 This operation has a 2-megabyte request-size limit and include the CSS settings and image assets for your app client. Your branding settings might exceed 2MB in size. Amazon Cognito doesn't require that you pass all parameters in one request and preserves existing style settings that you don't specify. If your request is larger than 2MB, separate it into multiple requests, each with a size smaller than the limit. 

As a best practice, modify the output of [DescribeManagedLoginBrandingByClient](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeManagedLoginBrandingByClient.html) into the request parameters for this operation. To get all settings, set `ReturnMergedResources` to `true`. For more information, see [API and SDK operations for managed login branding](https://docs.aws.amazon.com/cognito/latest/developerguide/managed-login-brandingdesigner.html#branding-designer-api)

## Syntax
<a name="aws-resource-cognito-managedloginbranding-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-cognito-managedloginbranding-syntax.json"></a>

```
{
  "Type" : "AWS::Cognito::ManagedLoginBranding",
  "Properties" : {
      "[Assets](#cfn-cognito-managedloginbranding-assets)" : [ AssetType, ... ],
      "[ClientId](#cfn-cognito-managedloginbranding-clientid)" : String,
      "[ReturnMergedResources](#cfn-cognito-managedloginbranding-returnmergedresources)" : Boolean,
      "[Settings](#cfn-cognito-managedloginbranding-settings)" : Json,
      "[UseCognitoProvidedValues](#cfn-cognito-managedloginbranding-usecognitoprovidedvalues)" : Boolean,
      "[UserPoolId](#cfn-cognito-managedloginbranding-userpoolid)" : String
    }
}
```

### YAML
<a name="aws-resource-cognito-managedloginbranding-syntax.yaml"></a>

```
Type: AWS::Cognito::ManagedLoginBranding
Properties:
  [Assets](#cfn-cognito-managedloginbranding-assets): 
    - AssetType
  [ClientId](#cfn-cognito-managedloginbranding-clientid): String
  [ReturnMergedResources](#cfn-cognito-managedloginbranding-returnmergedresources): Boolean
  [Settings](#cfn-cognito-managedloginbranding-settings): Json
  [UseCognitoProvidedValues](#cfn-cognito-managedloginbranding-usecognitoprovidedvalues): Boolean
  [UserPoolId](#cfn-cognito-managedloginbranding-userpoolid): String
```

## Properties
<a name="aws-resource-cognito-managedloginbranding-properties"></a>

`Assets`  <a name="cfn-cognito-managedloginbranding-assets"></a>
An array of image files that you want to apply to roles like backgrounds, logos, and icons. Each object must also indicate whether it is for dark mode, light mode, or browser-adaptive mode.  
*Required*: No  
*Type*: Array of [AssetType](aws-properties-cognito-managedloginbranding-assettype.md)  
*Minimum*: `0`  
*Maximum*: `40`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ClientId`  <a name="cfn-cognito-managedloginbranding-clientid"></a>
The app client that you want to assign the branding style to. Each style is linked to an app client until you delete it.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ReturnMergedResources`  <a name="cfn-cognito-managedloginbranding-returnmergedresources"></a>
When `true`, returns values for branding options that are unchanged from Amazon Cognito defaults. When `false` or when you omit this parameter, returns only values that you customized in your branding style.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Settings`  <a name="cfn-cognito-managedloginbranding-settings"></a>
A JSON file, encoded as a `Document` type, with the the settings that you want to apply to your style.  
The following components are not currently implemented and reserved for future use:  
+  `signUp` 
+  `instructions` 
+  `sessionTimerDisplay` 
+ `languageSelector` (for localization, see [Managed login localization)](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-managed-login.html#managed-login-localization)
*Required*: No  
*Type*: Json  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`UseCognitoProvidedValues`  <a name="cfn-cognito-managedloginbranding-usecognitoprovidedvalues"></a>
When true, applies the default branding style options. This option reverts to default style options that are managed by Amazon Cognito. You can modify them later in the branding editor.  
When you specify `true` for this option, you must also omit values for `Settings` and `Assets` in the request.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`UserPoolId`  <a name="cfn-cognito-managedloginbranding-userpoolid"></a>
The user pool where the branding style is assigned.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[\w-]+_[0-9a-zA-Z]+`  
*Minimum*: `1`  
*Maximum*: `55`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-cognito-managedloginbranding-return-values"></a>

### Ref
<a name="aws-resource-cognito-managedloginbranding-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the style ID, for example `a1b2c3d4-5678-90ab-cdef-EXAMPLE22222`.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-cognito-managedloginbranding-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-cognito-managedloginbranding-return-values-fn--getatt-fn--getatt"></a>

`ManagedLoginBrandingId`  <a name="ManagedLoginBrandingId-fn::getatt"></a>
The ID of the managed login branding style.

## Examples
<a name="aws-resource-cognito-managedloginbranding--examples"></a>



### Creating a new branding style for an app client
<a name="aws-resource-cognito-managedloginbranding--examples--Creating_a_new_branding_style_for_an_app_client"></a>

The following example creates a branding style for the requested app client.

#### JSON
<a name="aws-resource-cognito-managedloginbranding--examples--Creating_a_new_branding_style_for_an_app_client--json"></a>

```
{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Description": "Provision a managed login branding style to a user pool app client\n",
    "Resources": {
        "ManagedLoginBranding": {
            "Properties": {
                "Assets": [
                    {
                        "Bytes": "PHN2ZyB3aWR0aD0iMjAwMDAiIGhlaWdodD0iNDAwIiB2aWV3Qm94PSIwIDAgMjAwMDAgNDAwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8ZyBjbGlwLXBhdGg9InVybCgjY2xpcDBfMTcyNTlfMjM2Njc0KSI+CjxyZWN0IHdpZHRoPSIyMDAwMCIgaGVpZ2h0PSI0MDAiIGZpbGw9InVybCgjcGFpbnQwX2xpbmVhcl8xNzI1OV8yMzY2NzQpIi8+CjxwYXRoIGQ9Ik0wIDBIMjAwMDBWNDAwSDBWMFoiIGZpbGw9IiMxMjIwMzciIGZpbGwtb3BhY2l0eT0iMC41Ii8+CjwvZz4KPGRlZnM+CjxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQwX2xpbmVhcl8xNzI1OV8yMzY2NzQiIHgxPSItODk0LjI0OSIgeTE9IjE5OS45MzEiIHgyPSIxODAzNC41IiB5Mj0iLTU4OTkuNTciIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0JGODBGRiIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNGRjhGQUIiLz4KPC9saW5lYXJHcmFkaWVudD4KPGNsaXBQYXRoIGlkPSJjbGlwMF8xNzI1OV8yMzY2NzQiPgo8cmVjdCB3aWR0aD0iMjAwMDAiIGhlaWdodD0iNDAwIiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo=",
                        "Category": "PAGE_FOOTER_BACKGROUND",
                        "ColorMode": "DARK",
                        "Extension": "SVG"
                    }
                ],
                "ClientId": "1example23456789",
                "ReturnMergedResources": false,
                "Settings": {
                    "categories": {
                        "auth": {
                            "authMethodOrder": [
                                [
                                    {
                                        "display": "BUTTON",
                                        "type": "FEDERATED"
                                    },
                                    {
                                        "display": "INPUT",
                                        "type": "USERNAME_PASSWORD"
                                    }
                                ]
                            ],
                            "federation": {
                                "interfaceStyle": "BUTTON_LIST",
                                "order": [
                                ]
                            }
                        },
                        "form": {
                            "displayGraphics": true,
                            "instructions": {
                                "enabled": false
                            },
                            "languageSelector": {
                                "enabled": false
                            },
                            "location": {
                                "horizontal": "CENTER",
                                "vertical": "CENTER"
                            },
                            "sessionTimerDisplay": "NONE"
                        },
                        "global": {
                            "colorSchemeMode": "LIGHT",
                            "pageFooter": {
                                "enabled": false
                            },
                            "pageHeader": {
                                "enabled": false
                            },
                            "spacingDensity": "REGULAR"
                        },
                        "signUp": {
                            "acceptanceElements": [
                                {
                                    "enforcement": "NONE",
                                    "textKey": "en"
                                }
                            ]
                        }
                    },
                    "componentClasses": {
                        "buttons": {
                            "borderRadius": 8.0
                        },
                        "divider": {
                            "darkMode": {
                                "borderColor": "232b37ff"
                            },
                            "lightMode": {
                                "borderColor": "ebebf0ff"
                            }
                        },
                        "dropDown": {
                            "borderRadius": 8.0,
                            "darkMode": {
                                "defaults": {
                                    "itemBackgroundColor": "192534ff"
                                },
                                "hover": {
                                    "itemBackgroundColor": "081120ff",
                                    "itemBorderColor": "5f6b7aff",
                                    "itemTextColor": "e9ebedff"
                                },
                                "match": {
                                    "itemBackgroundColor": "d1d5dbff",
                                    "itemTextColor": "89bdeeff"
                                }
                            },
                            "lightMode": {
                                "defaults": {
                                    "itemBackgroundColor": "ffffffff"
                                },
                                "hover": {
                                    "itemBackgroundColor": "f4f4f4ff",
                                    "itemBorderColor": "7d8998ff",
                                    "itemTextColor": "000716ff"
                                },
                                "match": {
                                    "itemBackgroundColor": "414d5cff",
                                    "itemTextColor": "0972d3ff"
                                }
                            }
                        },
                        "focusState": {
                            "darkMode": {
                                "borderColor": "539fe5ff"
                            },
                            "lightMode": {
                                "borderColor": "0972d3ff"
                            }
                        },
                        "idpButtons": {
                            "icons": {
                                "enabled": true
                            }
                        },
                        "input": {
                            "borderRadius": 8.0,
                            "darkMode": {
                                "defaults": {
                                    "backgroundColor": "0f1b2aff",
                                    "borderColor": "5f6b7aff"
                                },
                                "placeholderColor": "8d99a8ff"
                            },
                            "lightMode": {
                                "defaults": {
                                    "backgroundColor": "ffffffff",
                                    "borderColor": "7d8998ff"
                                },
                                "placeholderColor": "5f6b7aff"
                            }
                        },
                        "inputDescription": {
                            "darkMode": {
                                "textColor": "8d99a8ff"
                            },
                            "lightMode": {
                                "textColor": "5f6b7aff"
                            }
                        },
                        "inputLabel": {
                            "darkMode": {
                                "textColor": "d1d5dbff"
                            },
                            "lightMode": {
                                "textColor": "000716ff"
                            }
                        },
                        "link": {
                            "darkMode": {
                                "defaults": {
                                    "textColor": "539fe5ff"
                                },
                                "hover": {
                                    "textColor": "89bdeeff"
                                }
                            },
                            "lightMode": {
                                "defaults": {
                                    "textColor": "0972d3ff"
                                },
                                "hover": {
                                    "textColor": "033160ff"
                                }
                            }
                        },
                        "optionControls": {
                            "darkMode": {
                                "defaults": {
                                    "backgroundColor": "0f1b2aff",
                                    "borderColor": "7d8998ff"
                                },
                                "selected": {
                                    "backgroundColor": "539fe5ff",
                                    "foregroundColor": "000716ff"
                                }
                            },
                            "lightMode": {
                                "defaults": {
                                    "backgroundColor": "ffffffff",
                                    "borderColor": "7d8998ff"
                                },
                                "selected": {
                                    "backgroundColor": "0972d3ff",
                                    "foregroundColor": "ffffffff"
                                }
                            }
                        },
                        "statusIndicator": {
                            "darkMode": {
                                "error": {
                                    "backgroundColor": "1a0000ff",
                                    "borderColor": "eb6f6fff",
                                    "indicatorColor": "eb6f6fff"
                                },
                                "pending": {
                                    "indicatorColor": "AAAAAAAA"
                                },
                                "success": {
                                    "backgroundColor": "001a02ff",
                                    "borderColor": "29ad32ff",
                                    "indicatorColor": "29ad32ff"
                                },
                                "warning": {
                                    "backgroundColor": "1d1906ff",
                                    "borderColor": "e0ca57ff",
                                    "indicatorColor": "e0ca57ff"
                                }
                            },
                            "lightMode": {
                                "error": {
                                    "backgroundColor": "fff7f7ff",
                                    "borderColor": "d91515ff",
                                    "indicatorColor": "d91515ff"
                                },
                                "pending": {
                                    "indicatorColor": "AAAAAAAA"
                                },
                                "success": {
                                    "backgroundColor": "f2fcf3ff",
                                    "borderColor": "037f0cff",
                                    "indicatorColor": "037f0cff"
                                },
                                "warning": {
                                    "backgroundColor": "fffce9ff",
                                    "borderColor": "8d6605ff",
                                    "indicatorColor": "8d6605ff"
                                }
                            }
                        }
                    },
                    "components": {
                        "alert": {
                            "borderRadius": 12.0,
                            "darkMode": {
                                "error": {
                                    "backgroundColor": "1a0000ff",
                                    "borderColor": "eb6f6fff"
                                }
                            },
                            "lightMode": {
                                "error": {
                                    "backgroundColor": "fff7f7ff",
                                    "borderColor": "d91515ff"
                                }
                            }
                        },
                        "favicon": {
                            "enabledTypes": [
                                "ICO",
                                "SVG"
                            ]
                        },
                        "form": {
                            "backgroundImage": {
                                "enabled": false
                            },
                            "borderRadius": 8.0,
                            "darkMode": {
                                "backgroundColor": "0f1b2aff",
                                "borderColor": "424650ff"
                            },
                            "lightMode": {
                                "backgroundColor": "ffffffff",
                                "borderColor": "c6c6cdff"
                            },
                            "logo": {
                                "enabled": false,
                                "formInclusion": "IN",
                                "location": "CENTER",
                                "position": "TOP"
                            }
                        },
                        "idpButton": {
                            "custom": {
                            },
                            "standard": {
                                "darkMode": {
                                    "active": {
                                        "backgroundColor": "354150ff",
                                        "borderColor": "89bdeeff",
                                        "textColor": "89bdeeff"
                                    },
                                    "defaults": {
                                        "backgroundColor": "0f1b2aff",
                                        "borderColor": "c6c6cdff",
                                        "textColor": "c6c6cdff"
                                    },
                                    "hover": {
                                        "backgroundColor": "192534ff",
                                        "borderColor": "89bdeeff",
                                        "textColor": "89bdeeff"
                                    }
                                },
                                "lightMode": {
                                    "active": {
                                        "backgroundColor": "d3e7f9ff",
                                        "borderColor": "033160ff",
                                        "textColor": "033160ff"
                                    },
                                    "defaults": {
                                        "backgroundColor": "ffffffff",
                                        "borderColor": "424650ff",
                                        "textColor": "424650ff"
                                    },
                                    "hover": {
                                        "backgroundColor": "f2f8fdff",
                                        "borderColor": "033160ff",
                                        "textColor": "033160ff"
                                    }
                                }
                            }
                        },
                        "pageBackground": {
                            "darkMode": {
                                "color": "0f1b2aff"
                            },
                            "image": {
                                "enabled": true
                            },
                            "lightMode": {
                                "color": "ffffffff"
                            }
                        },
                        "pageFooter": {
                            "backgroundImage": {
                                "enabled": false
                            },
                            "darkMode": {
                                "background": {
                                    "color": "0f141aff"
                                },
                                "borderColor": "424650ff"
                            },
                            "lightMode": {
                                "background": {
                                    "color": "fafafaff"
                                },
                                "borderColor": "d5dbdbff"
                            },
                            "logo": {
                                "enabled": false,
                                "location": "START"
                            }
                        },
                        "pageHeader": {
                            "backgroundImage": {
                                "enabled": false
                            },
                            "darkMode": {
                                "background": {
                                    "color": "0f141aff"
                                },
                                "borderColor": "424650ff"
                            },
                            "lightMode": {
                                "background": {
                                    "color": "fafafaff"
                                },
                                "borderColor": "d5dbdbff"
                            },
                            "logo": {
                                "enabled": false,
                                "location": "START"
                            }
                        },
                        "pageText": {
                            "darkMode": {
                                "bodyColor": "b6bec9ff",
                                "descriptionColor": "b6bec9ff",
                                "headingColor": "d1d5dbff"
                            },
                            "lightMode": {
                                "bodyColor": "414d5cff",
                                "descriptionColor": "414d5cff",
                                "headingColor": "000716ff"
                            }
                        },
                        "phoneNumberSelector": {
                            "displayType": "TEXT"
                        },
                        "primaryButton": {
                            "darkMode": {
                                "active": {
                                    "backgroundColor": "539fe5ff",
                                    "textColor": "000716ff"
                                },
                                "defaults": {
                                    "backgroundColor": "539fe5ff",
                                    "textColor": "000716ff"
                                },
                                "disabled": {
                                    "backgroundColor": "ffffffff",
                                    "borderColor": "ffffffff"
                                },
                                "hover": {
                                    "backgroundColor": "89bdeeff",
                                    "textColor": "000716ff"
                                }
                            },
                            "lightMode": {
                                "active": {
                                    "backgroundColor": "033160ff",
                                    "textColor": "ffffffff"
                                },
                                "defaults": {
                                    "backgroundColor": "0972d3ff",
                                    "textColor": "ffffffff"
                                },
                                "disabled": {
                                    "backgroundColor": "ffffffff",
                                    "borderColor": "ffffffff"
                                },
                                "hover": {
                                    "backgroundColor": "033160ff",
                                    "textColor": "ffffffff"
                                }
                            }
                        },
                        "secondaryButton": {
                            "darkMode": {
                                "active": {
                                    "backgroundColor": "354150ff",
                                    "borderColor": "89bdeeff",
                                    "textColor": "89bdeeff"
                                },
                                "defaults": {
                                    "backgroundColor": "0f1b2aff",
                                    "borderColor": "539fe5ff",
                                    "textColor": "539fe5ff"
                                },
                                "hover": {
                                    "backgroundColor": "192534ff",
                                    "borderColor": "89bdeeff",
                                    "textColor": "89bdeeff"
                                }
                            },
                            "lightMode": {
                                "active": {
                                    "backgroundColor": "d3e7f9ff",
                                    "borderColor": "033160ff",
                                    "textColor": "033160ff"
                                },
                                "defaults": {
                                    "backgroundColor": "ffffffff",
                                    "borderColor": "0972d3ff",
                                    "textColor": "0972d3ff"
                                },
                                "hover": {
                                    "backgroundColor": "f2f8fdff",
                                    "borderColor": "033160ff",
                                    "textColor": "033160ff"
                                }
                            }
                        }
                    }
                },
                "UseCognitoProvidedValues": false,
                "UserPoolId": "ca-central-1_EXAMPLE"
            },
            "Type": "AWS::Cognito::ManagedLoginBranding"
        }
    }
}
```

#### YAML
<a name="aws-resource-cognito-managedloginbranding--examples--Creating_a_new_branding_style_for_an_app_client--yaml"></a>

```
AWSTemplateFormatVersion: "2010-09-09"

Description: |
  Provision a managed login branding style to a user pool app client

Resources:
  ManagedLoginBranding:
    Type: AWS::Cognito::ManagedLoginBranding
    Properties:
      Assets:
        - Bytes: PHN2ZyB3aWR0aD0iMjAwMDAiIGhlaWdodD0iNDAwIiB2aWV3Qm94PSIwIDAgMjAwMDAgNDAwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8ZyBjbGlwLXBhdGg9InVybCgjY2xpcDBfMTcyNTlfMjM2Njc0KSI+CjxyZWN0IHdpZHRoPSIyMDAwMCIgaGVpZ2h0PSI0MDAiIGZpbGw9InVybCgjcGFpbnQwX2xpbmVhcl8xNzI1OV8yMzY2NzQpIi8+CjxwYXRoIGQ9Ik0wIDBIMjAwMDBWNDAwSDBWMFoiIGZpbGw9IiMxMjIwMzciIGZpbGwtb3BhY2l0eT0iMC41Ii8+CjwvZz4KPGRlZnM+CjxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQwX2xpbmVhcl8xNzI1OV8yMzY2NzQiIHgxPSItODk0LjI0OSIgeTE9IjE5OS45MzEiIHgyPSIxODAzNC41IiB5Mj0iLTU4OTkuNTciIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0JGODBGRiIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNGRjhGQUIiLz4KPC9saW5lYXJHcmFkaWVudD4KPGNsaXBQYXRoIGlkPSJjbGlwMF8xNzI1OV8yMzY2NzQiPgo8cmVjdCB3aWR0aD0iMjAwMDAiIGhlaWdodD0iNDAwIiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo=
          Category: PAGE_FOOTER_BACKGROUND
          ColorMode: DARK
          Extension: SVG
      ClientId: 1example23456789
      ReturnMergedResources: false
      Settings:
        categories:
          auth:
            authMethodOrder:
              - - display: BUTTON
                  type: FEDERATED
                - display: INPUT
                  type: USERNAME_PASSWORD
            federation:
              interfaceStyle: BUTTON_LIST
              order: []
          form:
            displayGraphics: true
            instructions:
              enabled: false
            languageSelector:
              enabled: false
            location:
              horizontal: CENTER
              vertical: CENTER
            sessionTimerDisplay: NONE
          global:
            colorSchemeMode: LIGHT
            pageFooter:
              enabled: false
            pageHeader:
              enabled: false
            spacingDensity: REGULAR
          signUp:
            acceptanceElements:
              - enforcement: NONE
                textKey: en
        componentClasses:
          buttons:
            borderRadius: 8.0
          divider:
            darkMode:
              borderColor: 232b37ff
            lightMode:
              borderColor: ebebf0ff
          dropDown:
            borderRadius: 8.0
            darkMode:
              defaults:
                itemBackgroundColor: 192534ff
              hover:
                itemBackgroundColor: 081120ff
                itemBorderColor: 5f6b7aff
                itemTextColor: e9ebedff
              match:
                itemBackgroundColor: d1d5dbff
                itemTextColor: 89bdeeff
            lightMode:
              defaults:
                itemBackgroundColor: ffffffff
              hover:
                itemBackgroundColor: f4f4f4ff
                itemBorderColor: 7d8998ff
                itemTextColor: 000716ff
              match:
                itemBackgroundColor: 414d5cff
                itemTextColor: 0972d3ff
          focusState:
            darkMode:
              borderColor: 539fe5ff
            lightMode:
              borderColor: 0972d3ff
          idpButtons:
            icons:
              enabled: true
          input:
            borderRadius: 8.0
            darkMode:
              defaults:
                backgroundColor: 0f1b2aff
                borderColor: 5f6b7aff
              placeholderColor: 8d99a8ff
            lightMode:
              defaults:
                backgroundColor: ffffffff
                borderColor: 7d8998ff
              placeholderColor: 5f6b7aff
          inputDescription:
            darkMode:
              textColor: 8d99a8ff
            lightMode:
              textColor: 5f6b7aff
          inputLabel:
            darkMode:
              textColor: d1d5dbff
            lightMode:
              textColor: 000716ff
          link:
            darkMode:
              defaults:
                textColor: 539fe5ff
              hover:
                textColor: 89bdeeff
            lightMode:
              defaults:
                textColor: 0972d3ff
              hover:
                textColor: 033160ff
          optionControls:
            darkMode:
              defaults:
                backgroundColor: 0f1b2aff
                borderColor: 7d8998ff
              selected:
                backgroundColor: 539fe5ff
                foregroundColor: 000716ff
            lightMode:
              defaults:
                backgroundColor: ffffffff
                borderColor: 7d8998ff
              selected:
                backgroundColor: 0972d3ff
                foregroundColor: ffffffff
          statusIndicator:
            darkMode:
              error:
                backgroundColor: 1a0000ff
                borderColor: eb6f6fff
                indicatorColor: eb6f6fff
              pending:
                indicatorColor: AAAAAAAA
              success:
                backgroundColor: 001a02ff
                borderColor: 29ad32ff
                indicatorColor: 29ad32ff
              warning:
                backgroundColor: 1d1906ff
                borderColor: e0ca57ff
                indicatorColor: e0ca57ff
            lightMode:
              error:
                backgroundColor: fff7f7ff
                borderColor: d91515ff
                indicatorColor: d91515ff
              pending:
                indicatorColor: AAAAAAAA
              success:
                backgroundColor: f2fcf3ff
                borderColor: 037f0cff
                indicatorColor: 037f0cff
              warning:
                backgroundColor: fffce9ff
                borderColor: 8d6605ff
                indicatorColor: 8d6605ff
        components:
          alert:
            borderRadius: 12.0
            darkMode:
              error:
                backgroundColor: 1a0000ff
                borderColor: eb6f6fff
            lightMode:
              error:
                backgroundColor: fff7f7ff
                borderColor: d91515ff
          favicon:
            enabledTypes:
              - ICO
              - SVG
          form:
            backgroundImage:
              enabled: false
            borderRadius: 8.0
            darkMode:
              backgroundColor: 0f1b2aff
              borderColor: 424650ff
            lightMode:
              backgroundColor: ffffffff
              borderColor: c6c6cdff
            logo:
              enabled: false
              formInclusion: IN
              location: CENTER
              position: TOP
          idpButton:
            custom: {}
            standard:
              darkMode:
                active:
                  backgroundColor: 354150ff
                  borderColor: 89bdeeff
                  textColor: 89bdeeff
                defaults:
                  backgroundColor: 0f1b2aff
                  borderColor: c6c6cdff
                  textColor: c6c6cdff
                hover:
                  backgroundColor: 192534ff
                  borderColor: 89bdeeff
                  textColor: 89bdeeff
              lightMode:
                active:
                  backgroundColor: d3e7f9ff
                  borderColor: 033160ff
                  textColor: 033160ff
                defaults:
                  backgroundColor: ffffffff
                  borderColor: 424650ff
                  textColor: 424650ff
                hover:
                  backgroundColor: f2f8fdff
                  borderColor: 033160ff
                  textColor: 033160ff
          pageBackground:
            darkMode:
              color: 0f1b2aff
            image:
              enabled: true
            lightMode:
              color: ffffffff
          pageFooter:
            backgroundImage:
              enabled: false
            darkMode:
              background:
                color: 0f141aff
              borderColor: 424650ff
            lightMode:
              background:
                color: fafafaff
              borderColor: d5dbdbff
            logo:
              enabled: false
              location: START
          pageHeader:
            backgroundImage:
              enabled: false
            darkMode:
              background:
                color: 0f141aff
              borderColor: 424650ff
            lightMode:
              background:
                color: fafafaff
              borderColor: d5dbdbff
            logo:
              enabled: false
              location: START
          pageText:
            darkMode:
              bodyColor: b6bec9ff
              descriptionColor: b6bec9ff
              headingColor: d1d5dbff
            lightMode:
              bodyColor: 414d5cff
              descriptionColor: 414d5cff
              headingColor: 000716ff
          phoneNumberSelector:
            displayType: TEXT
          primaryButton:
            darkMode:
              active:
                backgroundColor: 539fe5ff
                textColor: 000716ff
              defaults:
                backgroundColor: 539fe5ff
                textColor: 000716ff
              disabled:
                backgroundColor: ffffffff
                borderColor: ffffffff
              hover:
                backgroundColor: 89bdeeff
                textColor: 000716ff
            lightMode:
              active:
                backgroundColor: 033160ff
                textColor: ffffffff
              defaults:
                backgroundColor: 0972d3ff
                textColor: ffffffff
              disabled:
                backgroundColor: ffffffff
                borderColor: ffffffff
              hover:
                backgroundColor: 033160ff
                textColor: ffffffff
          secondaryButton:
            darkMode:
              active:
                backgroundColor: 354150ff
                borderColor: 89bdeeff
                textColor: 89bdeeff
              defaults:
                backgroundColor: 0f1b2aff
                borderColor: 539fe5ff
                textColor: 539fe5ff
              hover:
                backgroundColor: 192534ff
                borderColor: 89bdeeff
                textColor: 89bdeeff
            lightMode:
              active:
                backgroundColor: d3e7f9ff
                borderColor: 033160ff
                textColor: 033160ff
              defaults:
                backgroundColor: ffffffff
                borderColor: 0972d3ff
                textColor: 0972d3ff
              hover:
                backgroundColor: f2f8fdff
                borderColor: 033160ff
                textColor: 033160ff
      UseCognitoProvidedValues: false
      UserPoolId: ca-central-1_EXAMPLE
```

# AWS::Cognito::ManagedLoginBranding AssetType
<a name="aws-properties-cognito-managedloginbranding-assettype"></a>

An image file from a managed login branding style in a user pool.

## Syntax
<a name="aws-properties-cognito-managedloginbranding-assettype-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-managedloginbranding-assettype-syntax.json"></a>

```
{
  "[Bytes](#cfn-cognito-managedloginbranding-assettype-bytes)" : String,
  "[Category](#cfn-cognito-managedloginbranding-assettype-category)" : String,
  "[ColorMode](#cfn-cognito-managedloginbranding-assettype-colormode)" : String,
  "[Extension](#cfn-cognito-managedloginbranding-assettype-extension)" : String,
  "[ResourceId](#cfn-cognito-managedloginbranding-assettype-resourceid)" : String
}
```

### YAML
<a name="aws-properties-cognito-managedloginbranding-assettype-syntax.yaml"></a>

```
  [Bytes](#cfn-cognito-managedloginbranding-assettype-bytes): String
  [Category](#cfn-cognito-managedloginbranding-assettype-category): String
  [ColorMode](#cfn-cognito-managedloginbranding-assettype-colormode): String
  [Extension](#cfn-cognito-managedloginbranding-assettype-extension): String
  [ResourceId](#cfn-cognito-managedloginbranding-assettype-resourceid): String
```

## Properties
<a name="aws-properties-cognito-managedloginbranding-assettype-properties"></a>

`Bytes`  <a name="cfn-cognito-managedloginbranding-assettype-bytes"></a>
The image file, in Base64-encoded binary.  
*Required*: No  
*Type*: String  
*Maximum*: `1000000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Category`  <a name="cfn-cognito-managedloginbranding-assettype-category"></a>
The category that the image corresponds to in your managed login configuration. Managed login has asset categories for different types of logos, backgrounds, and icons.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `FAVICON_ICO | FAVICON_SVG | EMAIL_GRAPHIC | SMS_GRAPHIC | AUTH_APP_GRAPHIC | PASSWORD_GRAPHIC | PASSKEY_GRAPHIC | PAGE_HEADER_LOGO | PAGE_HEADER_BACKGROUND | PAGE_FOOTER_LOGO | PAGE_FOOTER_BACKGROUND | PAGE_BACKGROUND | FORM_BACKGROUND | FORM_LOGO | IDP_BUTTON_ICON`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ColorMode`  <a name="cfn-cognito-managedloginbranding-assettype-colormode"></a>
The display-mode target of the asset: light, dark, or browser-adaptive. For example, Amazon Cognito displays a dark-mode image only when the browser or application is in dark mode, but displays a browser-adaptive file in all contexts.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `LIGHT | DARK | DYNAMIC`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Extension`  <a name="cfn-cognito-managedloginbranding-assettype-extension"></a>
The file type of the image file.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `ICO | JPEG | PNG | SVG | WEBP`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ResourceId`  <a name="cfn-cognito-managedloginbranding-assettype-resourceid"></a>
The ID of the asset.  
*Required*: No  
*Type*: String  
*Pattern*: `^[\w\- ]+$`  
*Minimum*: `1`  
*Maximum*: `40`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::Terms
<a name="aws-resource-cognito-terms"></a>

Creates terms documents for the requested app client. When Terms and conditions and Privacy policy documents are configured, the app client displays links to them in the sign-up page of managed login for the app client.

You can provide URLs for terms documents in the languages that are supported by [managed login localization](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-managed-login.html#managed-login-localization). Amazon Cognito directs users to the terms documents for their current language, with fallback to `default` if no document exists for the language.

Each request accepts one type of terms document and a map of language-to-link for that document type. You must provide both types of terms documents in at least one language before Amazon Cognito displays your terms documents. Supply each type in separate requests.

For more information, see [Terms documents](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-managed-login.html#managed-login-terms-documents).

**Note**  
Amazon Cognito evaluates AWS Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you must use IAM credentials to authorize requests, and you must grant yourself the corresponding IAM permission in a policy.  
 [Signing AWS API Requests](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-signing.html) 
 [Using the Amazon Cognito user pools API and user pool endpoints](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pools-API-operations.html) 

## Syntax
<a name="aws-resource-cognito-terms-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-cognito-terms-syntax.json"></a>

```
{
  "Type" : "AWS::Cognito::Terms",
  "Properties" : {
      "[ClientId](#cfn-cognito-terms-clientid)" : String,
      "[Enforcement](#cfn-cognito-terms-enforcement)" : String,
      "[Links](#cfn-cognito-terms-links)" : {Key: Value, ...},
      "[TermsName](#cfn-cognito-terms-termsname)" : String,
      "[TermsSource](#cfn-cognito-terms-termssource)" : String,
      "[UserPoolId](#cfn-cognito-terms-userpoolid)" : String
    }
}
```

### YAML
<a name="aws-resource-cognito-terms-syntax.yaml"></a>

```
Type: AWS::Cognito::Terms
Properties:
  [ClientId](#cfn-cognito-terms-clientid): String
  [Enforcement](#cfn-cognito-terms-enforcement): String
  [Links](#cfn-cognito-terms-links): 
    Key: Value
  [TermsName](#cfn-cognito-terms-termsname): String
  [TermsSource](#cfn-cognito-terms-termssource): String
  [UserPoolId](#cfn-cognito-terms-userpoolid): String
```

## Properties
<a name="aws-resource-cognito-terms-properties"></a>

`ClientId`  <a name="cfn-cognito-terms-clientid"></a>
The ID of the app client that the terms documents are assigned to.  
*Required*: No  
*Type*: String  
*Pattern*: `[\w+]+`  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Enforcement`  <a name="cfn-cognito-terms-enforcement"></a>
This parameter is reserved for future use and currently accepts one value.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `NONE`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Links`  <a name="cfn-cognito-terms-links"></a>
A map of URLs to languages. For each localized language that will view the requested `TermsName`, assign a URL. A selection of `cognito:default` displays for all languages that don't have a language-specific URL.  
For example, `"cognito:default": "https://terms.example.com", "cognito:spanish": "https://terms.example.com/es"`.  
*Required*: Yes  
*Type*: Object of String  
*Pattern*: `^cognito:(default|english|french|spanish|german|bahasa-indonesia|italian|japanese|korean|portuguese-brazil|chinese-(simplified|traditional))$`  
*Minimum*: `1`  
*Maximum*: `1024`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TermsName`  <a name="cfn-cognito-terms-termsname"></a>
The type and friendly name of the terms documents.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^(terms-of-use|privacy-policy)$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TermsSource`  <a name="cfn-cognito-terms-termssource"></a>
This parameter is reserved for future use and currently accepts one value.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `LINK`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`UserPoolId`  <a name="cfn-cognito-terms-userpoolid"></a>
The ID of the user pool that contains the terms documents.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[\w-]+_[0-9a-zA-Z]+`  
*Minimum*: `1`  
*Maximum*: `55`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-cognito-terms-return-values"></a>

### Ref
<a name="aws-resource-cognito-terms-return-values-ref"></a>

### Fn::GetAtt
<a name="aws-resource-cognito-terms-return-values-fn--getatt"></a>

#### 
<a name="aws-resource-cognito-terms-return-values-fn--getatt-fn--getatt"></a>

`TermsId`  <a name="TermsId-fn::getatt"></a>
The ID of the terms documents.

# AWS::Cognito::UserPool
<a name="aws-resource-cognito-userpool"></a>

The `AWS::Cognito::UserPool` resource creates an Amazon Cognito user pool. For more information on working with Amazon Cognito user pools, see [Amazon Cognito User Pools](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools.html) and [CreateUserPool](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserPool.html).

**Note**  
If you don't specify a value for a parameter, Amazon Cognito sets it to a default value.

## Syntax
<a name="aws-resource-cognito-userpool-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-cognito-userpool-syntax.json"></a>

```
{
  "Type" : "AWS::Cognito::UserPool",
  "Properties" : {
      "[AccountRecoverySetting](#cfn-cognito-userpool-accountrecoverysetting)" : AccountRecoverySetting,
      "[AdminCreateUserConfig](#cfn-cognito-userpool-admincreateuserconfig)" : AdminCreateUserConfig,
      "[AliasAttributes](#cfn-cognito-userpool-aliasattributes)" : [ String, ... ],
      "[AutoVerifiedAttributes](#cfn-cognito-userpool-autoverifiedattributes)" : [ String, ... ],
      "[DeletionProtection](#cfn-cognito-userpool-deletionprotection)" : String,
      "[DeviceConfiguration](#cfn-cognito-userpool-deviceconfiguration)" : DeviceConfiguration,
      "[EmailAuthenticationMessage](#cfn-cognito-userpool-emailauthenticationmessage)" : String,
      "[EmailAuthenticationSubject](#cfn-cognito-userpool-emailauthenticationsubject)" : String,
      "[EmailConfiguration](#cfn-cognito-userpool-emailconfiguration)" : EmailConfiguration,
      "[EmailVerificationMessage](#cfn-cognito-userpool-emailverificationmessage)" : String,
      "[EmailVerificationSubject](#cfn-cognito-userpool-emailverificationsubject)" : String,
      "[EnabledMfas](#cfn-cognito-userpool-enabledmfas)" : [ String, ... ],
      "[LambdaConfig](#cfn-cognito-userpool-lambdaconfig)" : LambdaConfig,
      "[MfaConfiguration](#cfn-cognito-userpool-mfaconfiguration)" : String,
      "[Policies](#cfn-cognito-userpool-policies)" : Policies,
      "[Schema](#cfn-cognito-userpool-schema)" : [ SchemaAttribute, ... ],
      "[SmsAuthenticationMessage](#cfn-cognito-userpool-smsauthenticationmessage)" : String,
      "[SmsConfiguration](#cfn-cognito-userpool-smsconfiguration)" : SmsConfiguration,
      "[SmsVerificationMessage](#cfn-cognito-userpool-smsverificationmessage)" : String,
      "[UserAttributeUpdateSettings](#cfn-cognito-userpool-userattributeupdatesettings)" : UserAttributeUpdateSettings,
      "[UsernameAttributes](#cfn-cognito-userpool-usernameattributes)" : [ String, ... ],
      "[UsernameConfiguration](#cfn-cognito-userpool-usernameconfiguration)" : UsernameConfiguration,
      "[UserPoolAddOns](#cfn-cognito-userpool-userpooladdons)" : UserPoolAddOns,
      "[UserPoolName](#cfn-cognito-userpool-userpoolname)" : String,
      "[UserPoolTags](#cfn-cognito-userpool-userpooltags)" : {Key: Value, ...},
      "[UserPoolTier](#cfn-cognito-userpool-userpooltier)" : String,
      "[VerificationMessageTemplate](#cfn-cognito-userpool-verificationmessagetemplate)" : VerificationMessageTemplate,
      "[WebAuthnRelyingPartyID](#cfn-cognito-userpool-webauthnrelyingpartyid)" : String,
      "[WebAuthnUserVerification](#cfn-cognito-userpool-webauthnuserverification)" : String
    }
}
```

### YAML
<a name="aws-resource-cognito-userpool-syntax.yaml"></a>

```
Type: AWS::Cognito::UserPool
Properties:
  [AccountRecoverySetting](#cfn-cognito-userpool-accountrecoverysetting): 
    AccountRecoverySetting
  [AdminCreateUserConfig](#cfn-cognito-userpool-admincreateuserconfig): 
    AdminCreateUserConfig
  [AliasAttributes](#cfn-cognito-userpool-aliasattributes): 
    - String
  [AutoVerifiedAttributes](#cfn-cognito-userpool-autoverifiedattributes): 
    - String
  [DeletionProtection](#cfn-cognito-userpool-deletionprotection): String
  [DeviceConfiguration](#cfn-cognito-userpool-deviceconfiguration): 
    DeviceConfiguration
  [EmailAuthenticationMessage](#cfn-cognito-userpool-emailauthenticationmessage): String
  [EmailAuthenticationSubject](#cfn-cognito-userpool-emailauthenticationsubject): String
  [EmailConfiguration](#cfn-cognito-userpool-emailconfiguration): 
    EmailConfiguration
  [EmailVerificationMessage](#cfn-cognito-userpool-emailverificationmessage): String
  [EmailVerificationSubject](#cfn-cognito-userpool-emailverificationsubject): String
  [EnabledMfas](#cfn-cognito-userpool-enabledmfas): 
    - String
  [LambdaConfig](#cfn-cognito-userpool-lambdaconfig): 
    LambdaConfig
  [MfaConfiguration](#cfn-cognito-userpool-mfaconfiguration): String
  [Policies](#cfn-cognito-userpool-policies): 
    Policies
  [Schema](#cfn-cognito-userpool-schema): 
    - SchemaAttribute
  [SmsAuthenticationMessage](#cfn-cognito-userpool-smsauthenticationmessage): String
  [SmsConfiguration](#cfn-cognito-userpool-smsconfiguration): 
    SmsConfiguration
  [SmsVerificationMessage](#cfn-cognito-userpool-smsverificationmessage): String
  [UserAttributeUpdateSettings](#cfn-cognito-userpool-userattributeupdatesettings): 
    UserAttributeUpdateSettings
  [UsernameAttributes](#cfn-cognito-userpool-usernameattributes): 
    - String
  [UsernameConfiguration](#cfn-cognito-userpool-usernameconfiguration): 
    UsernameConfiguration
  [UserPoolAddOns](#cfn-cognito-userpool-userpooladdons): 
    UserPoolAddOns
  [UserPoolName](#cfn-cognito-userpool-userpoolname): String
  [UserPoolTags](#cfn-cognito-userpool-userpooltags): 
    Key: Value
  [UserPoolTier](#cfn-cognito-userpool-userpooltier): String
  [VerificationMessageTemplate](#cfn-cognito-userpool-verificationmessagetemplate): 
    VerificationMessageTemplate
  [WebAuthnRelyingPartyID](#cfn-cognito-userpool-webauthnrelyingpartyid): String
  [WebAuthnUserVerification](#cfn-cognito-userpool-webauthnuserverification): String
```

## Properties
<a name="aws-resource-cognito-userpool-properties"></a>

`AccountRecoverySetting`  <a name="cfn-cognito-userpool-accountrecoverysetting"></a>
The available verified method a user can use to recover their password when they call `ForgotPassword`. You can use this setting to define a preferred method when a user has more than one method available. With this setting, SMS doesn't qualify for a valid password recovery mechanism if the user also has SMS multi-factor authentication (MFA) activated. In the absence of this setting, Amazon Cognito uses the legacy behavior to determine the recovery method where SMS is preferred through email.  
*Required*: No  
*Type*: [AccountRecoverySetting](aws-properties-cognito-userpool-accountrecoverysetting.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AdminCreateUserConfig`  <a name="cfn-cognito-userpool-admincreateuserconfig"></a>
The settings for administrator creation of users in a user pool. Contains settings for allowing user sign-up, customizing invitation messages to new users, and the amount of time before temporary passwords expire.  
*Required*: No  
*Type*: [AdminCreateUserConfig](aws-properties-cognito-userpool-admincreateuserconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AliasAttributes`  <a name="cfn-cognito-userpool-aliasattributes"></a>
Attributes supported as an alias for this user pool. For more information about alias attributes, see [Customizing sign-in attributes](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-attributes.html#user-pool-settings-aliases).  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AutoVerifiedAttributes`  <a name="cfn-cognito-userpool-autoverifiedattributes"></a>
The attributes that you want your user pool to automatically verify. For more information, see [Verifying contact information at sign-up](https://docs.aws.amazon.com/cognito/latest/developerguide/signing-up-users-in-your-app.html#allowing-users-to-sign-up-and-confirm-themselves).  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DeletionProtection`  <a name="cfn-cognito-userpool-deletionprotection"></a>
When active, `DeletionProtection` prevents accidental deletion of your user pool. Before you can delete a user pool that you have protected against deletion, you must deactivate this feature.  
When you try to delete a protected user pool in a `DeleteUserPool` API request, Amazon Cognito returns an `InvalidParameterException` error. To delete a protected user pool, send a new `DeleteUserPool` request after you deactivate deletion protection in an `UpdateUserPool` API request.  
*Required*: No  
*Type*: String  
*Allowed values*: `ACTIVE | INACTIVE`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DeviceConfiguration`  <a name="cfn-cognito-userpool-deviceconfiguration"></a>
The device-remembering configuration for a user pool. Device remembering or device tracking is a "Remember me on this device" option for user pools that perform authentication with the device key of a trusted device in the back end, instead of a user-provided MFA code. For more information about device authentication, see [Working with user devices in your user pool](https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-device-tracking.html). A null value indicates that you have deactivated device remembering in your user pool.  
When you provide a value for any `DeviceConfiguration` field, you activate the Amazon Cognito device-remembering feature. For more information, see [Working with devices](https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-device-tracking.html).
*Required*: No  
*Type*: [DeviceConfiguration](aws-properties-cognito-userpool-deviceconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EmailAuthenticationMessage`  <a name="cfn-cognito-userpool-emailauthenticationmessage"></a>
Property description not available.  
*Required*: No  
*Type*: String  
*Minimum*: `6`  
*Maximum*: `20000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EmailAuthenticationSubject`  <a name="cfn-cognito-userpool-emailauthenticationsubject"></a>
Property description not available.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `140`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EmailConfiguration`  <a name="cfn-cognito-userpool-emailconfiguration"></a>
The email configuration of your user pool. The email configuration type sets your preferred sending method, AWS Region, and sender for messages from your user pool.  
*Required*: No  
*Type*: [EmailConfiguration](aws-properties-cognito-userpool-emailconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EmailVerificationMessage`  <a name="cfn-cognito-userpool-emailverificationmessage"></a>
This parameter is no longer used. See [VerificationMessageTemplateType](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpool-verificationmessagetemplate.html).  
*Required*: No  
*Type*: String  
*Minimum*: `6`  
*Maximum*: `20000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EmailVerificationSubject`  <a name="cfn-cognito-userpool-emailverificationsubject"></a>
This parameter is no longer used. See [VerificationMessageTemplateType](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpool-verificationmessagetemplate.html).  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `140`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EnabledMfas`  <a name="cfn-cognito-userpool-enabledmfas"></a>
Set enabled MFA options on a specified user pool. To disable all MFAs after it has been enabled, set `MfaConfiguration` to `OFF` and remove EnabledMfas. MFAs can only be all disabled if `MfaConfiguration` is `OFF`. After you enable `SMS_MFA`, you can only disable it by setting `MfaConfiguration` to `OFF`. Can be one of the following values:  
+ `SMS_MFA` - Enables MFA with SMS for the user pool. To select this option, you must also provide values for `SmsConfiguration`.
+ `SOFTWARE_TOKEN_MFA` - Enables software token MFA for the user pool.
+ `EMAIL_OTP` - Enables MFA with email for the user pool. To select this option, you must provide values for `EmailConfiguration` and within those, set `EmailSendingAccount` to `DEVELOPER`.
Allowed values: `SMS_MFA` \$1 `SOFTWARE_TOKEN_MFA` \$1 `EMAIL_OTP`  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LambdaConfig`  <a name="cfn-cognito-userpool-lambdaconfig"></a>
A collection of user pool Lambda triggers. Amazon Cognito invokes triggers at several possible stages of authentication operations. Triggers can modify the outcome of the operations that invoked them.  
*Required*: No  
*Type*: [LambdaConfig](aws-properties-cognito-userpool-lambdaconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MfaConfiguration`  <a name="cfn-cognito-userpool-mfaconfiguration"></a>
Displays the state of multi-factor authentication (MFA) as on, off, or optional. When `ON`, all users must set up MFA before they can sign in. When `OPTIONAL`, your application must make a client-side determination of whether a user wants to register an MFA device. For user pools with adaptive authentication with threat protection, choose `OPTIONAL`.  
When `MfaConfiguration` is `OPTIONAL`, managed login doesn't automatically prompt users to set up MFA. Amazon Cognito generates MFA prompts in API responses and in managed login for users who have chosen and configured a preferred MFA factor.  
*Required*: No  
*Type*: String  
*Allowed values*: `OFF | ON | OPTIONAL`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Policies`  <a name="cfn-cognito-userpool-policies"></a>
A list of user pool policies. Contains the policy that sets password-complexity requirements.  
*Required*: No  
*Type*: [Policies](aws-properties-cognito-userpool-policies.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Schema`  <a name="cfn-cognito-userpool-schema"></a>
An array of attributes for the new user pool. You can add custom attributes and modify the properties of default attributes. The specifications in this parameter set the required attributes in your user pool. For more information, see [Working with user attributes](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-attributes.html).  
*Required*: No  
*Type*: Array of [SchemaAttribute](aws-properties-cognito-userpool-schemaattribute.md)  
*Minimum*: `1`  
*Maximum*: `50`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SmsAuthenticationMessage`  <a name="cfn-cognito-userpool-smsauthenticationmessage"></a>
The contents of the SMS authentication message.  
*Required*: No  
*Type*: String  
*Minimum*: `6`  
*Maximum*: `140`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SmsConfiguration`  <a name="cfn-cognito-userpool-smsconfiguration"></a>
The settings for your Amazon Cognito user pool to send SMS messages with Amazon Simple Notification Service. To send SMS messages with Amazon SNS in the AWS Region that you want, the Amazon Cognito user pool uses an AWS Identity and Access Management (IAM) role in your AWS account. For more information see [SMS message settings](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-sms-settings.html).  
*Required*: No  
*Type*: [SmsConfiguration](aws-properties-cognito-userpool-smsconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SmsVerificationMessage`  <a name="cfn-cognito-userpool-smsverificationmessage"></a>
This parameter is no longer used. See [VerificationMessageTemplateType](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpool-verificationmessagetemplate.html).  
*Required*: No  
*Type*: String  
*Minimum*: `6`  
*Maximum*: `140`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`UserAttributeUpdateSettings`  <a name="cfn-cognito-userpool-userattributeupdatesettings"></a>
The settings for updates to user attributes. These settings include the property `AttributesRequireVerificationBeforeUpdate`, a user-pool setting that tells Amazon Cognito how to handle changes to the value of your users' email address and phone number attributes. For more information, see [ Verifying updates to email addresses and phone numbers](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-email-phone-verification.html#user-pool-settings-verifications-verify-attribute-updates).  
*Required*: No  
*Type*: [UserAttributeUpdateSettings](aws-properties-cognito-userpool-userattributeupdatesettings.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`UsernameAttributes`  <a name="cfn-cognito-userpool-usernameattributes"></a>
Specifies whether a user can use an email address or phone number as a username when they sign up.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`UsernameConfiguration`  <a name="cfn-cognito-userpool-usernameconfiguration"></a>
Sets the case sensitivity option for sign-in usernames. When `CaseSensitive` is `false` (case insensitive), users can sign in with any combination of capital and lowercase letters. For example, `username`, `USERNAME`, or `UserName`, or for email, `email@example.com` or `EMaiL@eXamplE.Com`. For most use cases, set case sensitivity to `false` as a best practice. When usernames and email addresses are case insensitive, Amazon Cognito treats any variation in case as the same user, and prevents a case variation from being assigned to the same attribute for a different user.  
When `CaseSensitive` is `true` (case sensitive), Amazon Cognito interprets `USERNAME` and `UserName` as distinct users.  
This configuration is immutable after you set it.  
*Required*: No  
*Type*: [UsernameConfiguration](aws-properties-cognito-userpool-usernameconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`UserPoolAddOns`  <a name="cfn-cognito-userpool-userpooladdons"></a>
Contains settings for activation of threat protection, including the operating mode and additional authentication types. To log user security information but take no action, set to `AUDIT`. To configure automatic security responses to potentially unwanted traffic to your user pool, set to `ENFORCED`.  
For more information, see [Adding advanced security to a user pool](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pool-settings-advanced-security.html). To activate this setting, your user pool must be on the [ Plus tier](https://docs.aws.amazon.com/cognito/latest/developerguide/feature-plans-features-plus.html).  
*Required*: No  
*Type*: [UserPoolAddOns](aws-properties-cognito-userpool-userpooladdons.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`UserPoolName`  <a name="cfn-cognito-userpool-userpoolname"></a>
A friendly name for your user pool.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`UserPoolTags`  <a name="cfn-cognito-userpool-userpooltags"></a>
The tag keys and values to assign to the user pool. A tag is a label that you can use to categorize and manage user pools in different ways, such as by purpose, owner, environment, or other criteria.  
*Required*: No  
*Type*: Object of String  
*Pattern*: `^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`UserPoolTier`  <a name="cfn-cognito-userpool-userpooltier"></a>
The user pool [feature plan](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-sign-in-feature-plans.html), or tier. This parameter determines the eligibility of the user pool for features like managed login, access-token customization, and threat protection. Defaults to `ESSENTIALS`.  
*Required*: No  
*Type*: String  
*Allowed values*: `LITE | ESSENTIALS | PLUS`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`VerificationMessageTemplate`  <a name="cfn-cognito-userpool-verificationmessagetemplate"></a>
The template for the verification message that your user pool delivers to users who set an email address or phone number attribute.  
Set the email message type that corresponds to your `DefaultEmailOption` selection. For `CONFIRM_WITH_LINK`, specify an `EmailMessageByLink` and leave `EmailMessage` blank. For `CONFIRM_WITH_CODE`, specify an `EmailMessage` and leave `EmailMessageByLink` blank. When you supply both parameters with either choice, Amazon Cognito returns an error.  
*Required*: No  
*Type*: [VerificationMessageTemplate](aws-properties-cognito-userpool-verificationmessagetemplate.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`WebAuthnRelyingPartyID`  <a name="cfn-cognito-userpool-webauthnrelyingpartyid"></a>
Sets or displays the authentication domain, typically your user pool domain, that passkey providers must use as a relying party (RP) in their configuration.  
Under the following conditions, the passkey relying party ID must be the fully-qualified domain name of your custom domain:  
+ The user pool is configured for passkey authentication.
+ The user pool has a custom domain, whether or not it also has a prefix domain.
+ Your application performs authentication with managed login or the classic hosted UI.
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `63`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`WebAuthnUserVerification`  <a name="cfn-cognito-userpool-webauthnuserverification"></a>
When `required`, users can only register and sign in users with passkeys that are capable of [user verification](https://www.w3.org/TR/webauthn-2/#enum-userVerificationRequirement). When `preferred`, your user pool doesn't require the use of authenticators with user verification but encourages it.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `9`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-cognito-userpool-return-values"></a>

### Ref
<a name="aws-resource-cognito-userpool-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns a generated ID, such as `us-east-2_zgaEXAMPLE`.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-cognito-userpool-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-cognito-userpool-return-values-fn--getatt-fn--getatt"></a>

`Arn`  <a name="Arn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the user pool, such as `arn:aws:cognito-idp:us-east-1:123412341234:userpool/us-east-1_123412341`.

`ProviderName`  <a name="ProviderName-fn::getatt"></a>
A friendly name for the IdP.

`ProviderURL`  <a name="ProviderURL-fn::getatt"></a>
The URL of the provider of the Amazon Cognito user pool, specified as a `String`.

`UserPoolId`  <a name="UserPoolId-fn::getatt"></a>
The ID of the user pool.

## Examples
<a name="aws-resource-cognito-userpool--examples"></a>



### Creating a new user pool
<a name="aws-resource-cognito-userpool--examples--Creating_a_new_user_pool"></a>

The following example creates a user pool with values for all possible parameters.

#### JSON
<a name="aws-resource-cognito-userpool--examples--Creating_a_new_user_pool--json"></a>

```
{
    "UserPool": {
        "Properties": {
            "AccountRecoverySetting": {
                "RecoveryMechanisms": [
                    {
                        "Name": "verified_email",
                        "Priority": 1
                    },
                    {
                        "Name": "verified_phone_number",
                        "Priority": 2
                    }
                ]
            },
            "AdminCreateUserConfig": {
                "AllowAdminCreateUserOnly": false,
                "InviteMessageTemplate": {
                    "EmailMessage": "Your username is {username} and your temporary password is {####}",
                    "EmailSubject": "Welcome to MyApp",
                    "SMSMessage": "Your username for MyApp is {username} and your temporary password is {####}."
                }
            },
            "AliasAttributes": [
                "email",
                "phone_number",
                "preferred_username"
            ],
            "AutoVerifiedAttributes": [
                "email",
                "phone_number"
            ],
            "DeletionProtection": "ACTIVE",
            "DeviceConfiguration": {
                "ChallengeRequiredOnNewDevice": true,
                "DeviceOnlyRememberedOnUserPrompt": true
            },
            "EmailAuthenticationMessage": "This is your sign-in code: \"{####}\"",
            "EmailAuthenticationSubject": "Your sign-in code",
            "EmailConfiguration": {
                "ConfigurationSet": "my-test-configuration-set",
                "EmailSendingAccount": "DEVELOPER",
                "From": "admin@example.com",
                "ReplyToEmailAddress": "no-reply@example.com",
                "SourceArn": "arn:aws:ses:us-west-2:123456789012:identity/admin@example.com"
            },
            "EmailVerificationMessage": "This is your verification code: \"{####}\"",
            "EmailVerificationSubject": "Your verification code",
            "EnabledMfas": [
                "EMAIL_OTP",
                "SMS_MFA",
                "SOFTWARE_TOKEN_MFA"
            ],
            "LambdaConfig": {
                "CreateAuthChallenge": "arn:aws:lambda:us-west-2:123456789012:function:my-CreateAuthChallenge-function",
                "CustomEmailSender": {
                    "LambdaArn": "arn:aws:lambda:us-west-2:123456789012:function:my-CustomEmailSender-function",
                    "LambdaVersion": "V1_0"
                },
                "CustomMessage": "arn:aws:lambda:us-west-2:123456789012:function:my-CustomMessage-function",
                "CustomSMSSender": {
                    "LambdaArn": "arn:aws:lambda:us-west-2:123456789012:function:my-CustomSMSSender-function",
                    "LambdaVersion": "V1_0"
                },
                "DefineAuthChallenge": "arn:aws:lambda:us-west-2:123456789012:function:my-DefineAuthChallenge-function",
                "KMSKeyID": "arn:aws:kms:us-west-2:123456789012:key/4d43904c-8edf-4bb4-9fca-fb1a80e41cbe",
                "PostAuthentication": "arn:aws:lambda:us-west-2:123456789012:function:my-PostAuthentication-function",
                "PostConfirmation": "arn:aws:lambda:us-west-2:123456789012:function:my-PostConfirmation-function",
                "PreAuthentication": "arn:aws:lambda:us-west-2:123456789012:function:my-PreAuthentication-function",
                "PreSignUp": "arn:aws:lambda:us-west-2:123456789012:function:my-PreSignUp-function",
                "PreTokenGenerationConfig": {
                    "LambdaArn": "arn:aws:lambda:us-west-2:123456789012:function:my-PreTokenGenerationConfig-function",
                    "LambdaVersion": "V2_0"
                },
                "UserMigration": "arn:aws:lambda:us-west-2:123456789012:function:my-UserMigration-function",
                "VerifyAuthChallengeResponse": "arn:aws:lambda:us-west-2:123456789012:function:my-VerifyAuthChallengeResponse-function"
            },
            "MfaConfiguration": "OPTIONAL",
            "Policies": {
                "PasswordPolicy": {
                    "MinimumLength": 12,
                    "PasswordHistorySize": 22,
                    "RequireLowercase": true,
                    "RequireNumbers": true,
                    "RequireSymbols": true,
                    "RequireUppercase": true,
                    "TemporaryPasswordValidityDays": 7
                },
                "SignInPolicy": {
                    "AllowedFirstAuthFactors": [
                        "EMAIL_OTP",
                        "SMS_OTP",
                        "WEB_AUTHN",
                        "PASSWORD"
                    ]
                }
            },
            "Schema": [
                {
                    "AttributeDataType": "String",
                    "DeveloperOnlyAttribute": false,
                    "Mutable": true,
                    "Name": "ResidenceType",
                    "Required": false,
                    "StringAttributeConstraints": {
                        "MaxLength": "999",
                        "MinLength": "1"
                    }
                },
                {
                    "AttributeDataType": "Number",
                    "DeveloperOnlyAttribute": true,
                    "Mutable": true,
                    "Name": "NumberOfResidents",
                    "NumberAttributeConstraints": {
                        "MaxValue": "9999999",
                        "MinValue": "1"
                    },
                    "Required": false
                },
                {
                    "AttributeDataType": "String",
                    "DeveloperOnlyAttribute": false,
                    "Mutable": true,
                    "Name": "email",
                    "Required": true,
                    "StringAttributeConstraints": {
                        "MaxLength": "99",
                        "MinLength": "1"
                    }
                }
            ],
            "SmsAuthenticationMessage": "This is your sign-in code: \"{####}\"",
            "SmsConfiguration": {
                "ExternalId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
                "SnsCallerArn": "arn:aws:iam::123456789012:role/service-role/my-test-SMS-Role",
                "SnsRegion": "us-west-2"
            },
            "SmsVerificationMessage": "This is your verification code: \"{####}\"",
            "UserAttributeUpdateSettings": {
                "AttributesRequireVerificationBeforeUpdate": [
                    "email",
                    "phone_number"
                ]
            },
            "UsernameConfiguration": {
                "CaseSensitive": true
            },
            "UserPoolAddOns": {
                "AdvancedSecurityAdditionalFlows": {
                    "CustomAuthMode": "AUDIT"
                },
                "AdvancedSecurityMode": "AUDIT"
            },
            "UserPoolName": "Example_CloudFormation_UserPool",
            "UserPoolTags": {
                "administrator": "Jie",
                "tenant": "ExampleCorp"
            },
            "UserPoolTier": "PLUS",
            "VerificationMessageTemplate": {
                "DefaultEmailOption": "CONFIRM_WITH_CODE",
                "EmailMessage": "This is your verification code: \"{####}\"",
                "EmailMessageByLink": "Choose this link to {##verify your email##}",
                "EmailSubject": "Your confirmation code",
                "EmailSubjectByLink": "Your confirmation link",
                "SmsMessage": "This is your verification code: \"{####}\""
            },
            "WebAuthnRelyingPartyID": "auth.example.com",
            "WebAuthnUserVerification": "preferred"
        },
        "Type": "AWS::Cognito::UserPool"
    }
}
```

#### YAML
<a name="aws-resource-cognito-userpool--examples--Creating_a_new_user_pool--yaml"></a>

```
ExampleUserPool:
    Type: AWS::Cognito::UserPool
    Properties:
      AccountRecoverySetting:
        RecoveryMechanisms:
          - Name: verified_email
            Priority: 1
          - Name: verified_phone_number
            Priority: 2
      AdminCreateUserConfig:
        AllowAdminCreateUserOnly: false
        InviteMessageTemplate:
          EmailMessage: Your username is {username} and your temporary password is {####}
          EmailSubject: Welcome to MyApp
          SMSMessage: Your username for MyApp is {username} and your temporary password is {####}.
      AliasAttributes:
        - email
        - phone_number
        - preferred_username
      AutoVerifiedAttributes:
        - email
        - phone_number
      DeletionProtection: ACTIVE
      DeviceConfiguration:
        ChallengeRequiredOnNewDevice: true
        DeviceOnlyRememberedOnUserPrompt: true
      EmailAuthenticationMessage: 'This is your sign-in code: "{####}"'
      EmailAuthenticationSubject: Your sign-in code
      EmailConfiguration:
        ConfigurationSet: my-test-configuration-set
        EmailSendingAccount: DEVELOPER
        From: admin@example.com
        ReplyToEmailAddress: no-reply@example.com
        SourceArn: arn:aws:ses:us-west-2:123456789012:identity/admin@example.com
      EmailVerificationMessage: 'This is your verification code: "{####}"'
      EmailVerificationSubject: Your verification code
      EnabledMfas:
        - EMAIL_OTP
        - SMS_MFA
        - SOFTWARE_TOKEN_MFA
      LambdaConfig:
        CreateAuthChallenge: arn:aws:lambda:us-west-2:123456789012:function:my-CreateAuthChallenge-function
        CustomEmailSender:
          LambdaArn: arn:aws:lambda:us-west-2:123456789012:function:my-CustomEmailSender-function
          LambdaVersion: V1_0
        CustomMessage: arn:aws:lambda:us-west-2:123456789012:function:my-CustomMessage-function
        CustomSMSSender:
          LambdaArn: arn:aws:lambda:us-west-2:123456789012:function:my-CustomSMSSender-function
          LambdaVersion: V1_0
        DefineAuthChallenge: arn:aws:lambda:us-west-2:123456789012:function:my-DefineAuthChallenge-function
        KMSKeyID: arn:aws:kms:us-west-2:123456789012:key/a1b2c3d4-5678-90ab-cdef-EXAMPLE22222
        PostAuthentication: arn:aws:lambda:us-west-2:123456789012:function:my-PostAuthentication-function
        PostConfirmation: arn:aws:lambda:us-west-2:123456789012:function:my-PostConfirmation-function
        PreAuthentication: arn:aws:lambda:us-west-2:123456789012:function:my-PreAuthentication-function
        PreSignUp: arn:aws:lambda:us-west-2:123456789012:function:my-PreSignUp-function
        PreTokenGenerationConfig:
          LambdaArn: arn:aws:lambda:us-west-2:123456789012:function:my-PreTokenGeneration-function
          LambdaVersion: V2_0
        UserMigration: arn:aws:lambda:us-west-2:123456789012:function:my-UserMigration-function
        VerifyAuthChallengeResponse: arn:aws:lambda:us-west-2:123456789012:function:my-VerifyAuthChallengeResponse-function
      MfaConfiguration: OPTIONAL
      Policies:
        PasswordPolicy:
          MinimumLength: 12
          PasswordHistorySize: 22
          RequireLowercase: true
          RequireNumbers: true
          RequireSymbols: true
          RequireUppercase: true
          TemporaryPasswordValidityDays: 7
        SignInPolicy:
          AllowedFirstAuthFactors:
            - EMAIL_OTP
            - SMS_OTP
            - WEB_AUTHN
            - PASSWORD
      Schema:
        - AttributeDataType: String
          DeveloperOnlyAttribute: false
          Mutable: true
          Name: ResidenceType
          Required: false
          StringAttributeConstraints:
            MaxLength: "999"
            MinLength: "1"
        - AttributeDataType: Number
          DeveloperOnlyAttribute: true
          Mutable: true
          Name: NumberOfResidents
          NumberAttributeConstraints:
            MaxValue: "9999999"
            MinValue: "1"
          Required: false
        - AttributeDataType: String
          DeveloperOnlyAttribute: false
          Mutable: true
          Name: email
          Required: true
          StringAttributeConstraints:
            MaxLength: "99"
            MinLength: "1"
      SmsAuthenticationMessage: 'This is your sign-in code: "{####}"'
      SmsConfiguration:
        ExternalId: a1b2c3d4-5678-90ab-cdef-EXAMPLE11111
        SnsCallerArn: arn:aws:iam::123456789012:role/service-role/my-test-SMS-Role
        SnsRegion: us-west-2
      SmsVerificationMessage: 'This is your verification code: "{####}"'
      UserAttributeUpdateSettings:
        AttributesRequireVerificationBeforeUpdate:
          - email
          - phone_number
      UsernameConfiguration:
        CaseSensitive: true
      UserPoolAddOns:
        AdvancedSecurityAdditionalFlows:
          CustomAuthMode: AUDIT
        AdvancedSecurityMode: AUDIT
      UserPoolName: Example_CloudFormation_UserPool
      UserPoolTags:
        administrator: Jie
        tenant: ExampleCorp
      UserPoolTier: PLUS
      VerificationMessageTemplate:
        DefaultEmailOption: CONFIRM_WITH_CODE
        EmailMessage: 'This is your verification code: "{####}"'
        EmailMessageByLink: Choose this link to {##verify your email##}
        EmailSubject: Your confirmation code
        EmailSubjectByLink: Your confirmation link
        SmsMessage: 'This is your verification code: "{####}"'
      WebAuthnRelyingPartyID: auth.example.com
      WebAuthnUserVerification: preferred
```

# AWS::Cognito::UserPool AccountRecoverySetting
<a name="aws-properties-cognito-userpool-accountrecoverysetting"></a>

The available verified method a user can use to recover their password when they call `ForgotPassword`. You can use this setting to define a preferred method when a user has more than one method available. With this setting, SMS doesn't qualify for a valid password recovery mechanism if the user also has SMS multi-factor authentication (MFA) activated. In the absence of this setting, Amazon Cognito uses the legacy behavior to determine the recovery method where SMS is preferred through email.

## Syntax
<a name="aws-properties-cognito-userpool-accountrecoverysetting-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpool-accountrecoverysetting-syntax.json"></a>

```
{
  "[RecoveryMechanisms](#cfn-cognito-userpool-accountrecoverysetting-recoverymechanisms)" : [ RecoveryOption, ... ]
}
```

### YAML
<a name="aws-properties-cognito-userpool-accountrecoverysetting-syntax.yaml"></a>

```
  [RecoveryMechanisms](#cfn-cognito-userpool-accountrecoverysetting-recoverymechanisms): 
    - RecoveryOption
```

## Properties
<a name="aws-properties-cognito-userpool-accountrecoverysetting-properties"></a>

`RecoveryMechanisms`  <a name="cfn-cognito-userpool-accountrecoverysetting-recoverymechanisms"></a>
The list of options and priorities for user message delivery in forgot-password operations. Sets or displays user pool preferences for email or SMS message priority, whether users should fall back to a second delivery method, and whether passwords should only be reset by administrators.  
*Required*: No  
*Type*: Array of [RecoveryOption](aws-properties-cognito-userpool-recoveryoption.md)  
*Minimum*: `1`  
*Maximum*: `2`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::UserPool AdminCreateUserConfig
<a name="aws-properties-cognito-userpool-admincreateuserconfig"></a>

The settings for administrator creation of users in a user pool. Contains settings for allowing user sign-up, customizing invitation messages to new users, and the amount of time before temporary passwords expire.

## Syntax
<a name="aws-properties-cognito-userpool-admincreateuserconfig-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpool-admincreateuserconfig-syntax.json"></a>

```
{
  "[AllowAdminCreateUserOnly](#cfn-cognito-userpool-admincreateuserconfig-allowadmincreateuseronly)" : Boolean,
  "[InviteMessageTemplate](#cfn-cognito-userpool-admincreateuserconfig-invitemessagetemplate)" : InviteMessageTemplate,
  "[UnusedAccountValidityDays](#cfn-cognito-userpool-admincreateuserconfig-unusedaccountvaliditydays)" : Integer
}
```

### YAML
<a name="aws-properties-cognito-userpool-admincreateuserconfig-syntax.yaml"></a>

```
  [AllowAdminCreateUserOnly](#cfn-cognito-userpool-admincreateuserconfig-allowadmincreateuseronly): Boolean
  [InviteMessageTemplate](#cfn-cognito-userpool-admincreateuserconfig-invitemessagetemplate): 
    InviteMessageTemplate
  [UnusedAccountValidityDays](#cfn-cognito-userpool-admincreateuserconfig-unusedaccountvaliditydays): Integer
```

## Properties
<a name="aws-properties-cognito-userpool-admincreateuserconfig-properties"></a>

`AllowAdminCreateUserOnly`  <a name="cfn-cognito-userpool-admincreateuserconfig-allowadmincreateuseronly"></a>
The setting for allowing self-service sign-up. When `true`, only administrators can create new user profiles. When `false`, users can register themselves and create a new user profile with the `SignUp` operation.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`InviteMessageTemplate`  <a name="cfn-cognito-userpool-admincreateuserconfig-invitemessagetemplate"></a>
The template for the welcome message to new users. This template must include the `{####}` temporary password placeholder if you are creating users with passwords. If your users don't have passwords, you can omit the placeholder.  
See also [Customizing User Invitation Messages](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pool-settings-message-customizations.html#cognito-user-pool-settings-user-invitation-message-customization).  
*Required*: No  
*Type*: [InviteMessageTemplate](aws-properties-cognito-userpool-invitemessagetemplate.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`UnusedAccountValidityDays`  <a name="cfn-cognito-userpool-admincreateuserconfig-unusedaccountvaliditydays"></a>
This parameter is no longer in use.  
The password expiration limit in days for administrator-created users. When this time expires, the user can't sign in with their temporary password. To reset the account after that time limit, you must call `AdminCreateUser` again, specifying `RESEND` for the `MessageAction` parameter.   
The default value for this parameter is 7.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Maximum*: `365`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::UserPool AdvancedSecurityAdditionalFlows
<a name="aws-properties-cognito-userpool-advancedsecurityadditionalflows"></a>

Threat protection configuration options for additional authentication types in your user pool, including custom authentication. 

## Syntax
<a name="aws-properties-cognito-userpool-advancedsecurityadditionalflows-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpool-advancedsecurityadditionalflows-syntax.json"></a>

```
{
  "[CustomAuthMode](#cfn-cognito-userpool-advancedsecurityadditionalflows-customauthmode)" : String
}
```

### YAML
<a name="aws-properties-cognito-userpool-advancedsecurityadditionalflows-syntax.yaml"></a>

```
  [CustomAuthMode](#cfn-cognito-userpool-advancedsecurityadditionalflows-customauthmode): String
```

## Properties
<a name="aws-properties-cognito-userpool-advancedsecurityadditionalflows-properties"></a>

`CustomAuthMode`  <a name="cfn-cognito-userpool-advancedsecurityadditionalflows-customauthmode"></a>
The operating mode of threat protection in custom authentication with [ Custom authentication challenge Lambda triggers](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-challenge.html).   
*Required*: No  
*Type*: String  
*Allowed values*: `AUDIT | ENFORCED`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::UserPool CustomEmailSender
<a name="aws-properties-cognito-userpool-customemailsender"></a>

The configuration of a custom email sender Lambda trigger. This trigger routes all email notifications from a user pool to a Lambda function that delivers the message using custom logic.

## Syntax
<a name="aws-properties-cognito-userpool-customemailsender-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpool-customemailsender-syntax.json"></a>

```
{
  "[LambdaArn](#cfn-cognito-userpool-customemailsender-lambdaarn)" : String,
  "[LambdaVersion](#cfn-cognito-userpool-customemailsender-lambdaversion)" : String
}
```

### YAML
<a name="aws-properties-cognito-userpool-customemailsender-syntax.yaml"></a>

```
  [LambdaArn](#cfn-cognito-userpool-customemailsender-lambdaarn): String
  [LambdaVersion](#cfn-cognito-userpool-customemailsender-lambdaversion): String
```

## Properties
<a name="aws-properties-cognito-userpool-customemailsender-properties"></a>

`LambdaArn`  <a name="cfn-cognito-userpool-customemailsender-lambdaarn"></a>
The Amazon Resource Name (ARN) of the function that you want to assign to your Lambda trigger.  
*Required*: No  
*Type*: String  
*Pattern*: `arn:[\w+=/,.@-]+:[\w+=/,.@-]+:([\w+=/,.@-]*)?:[0-9]+:[\w+=/,.@-]+(:[\w+=/,.@-]+)?(:[\w+=/,.@-]+)?`  
*Minimum*: `20`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LambdaVersion`  <a name="cfn-cognito-userpool-customemailsender-lambdaversion"></a>
The user pool trigger version of the request that Amazon Cognito sends to your Lambda function. Higher-numbered versions add fields that support new features.  
You must use a `LambdaVersion` of `V1_0` with a custom sender function.  
*Required*: No  
*Type*: String  
*Allowed values*: `V1_0`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::UserPool CustomSMSSender
<a name="aws-properties-cognito-userpool-customsmssender"></a>

The configuration of a custom SMS sender Lambda trigger. This trigger routes all SMS notifications from a user pool to a Lambda function that delivers the message using custom logic.

## Syntax
<a name="aws-properties-cognito-userpool-customsmssender-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpool-customsmssender-syntax.json"></a>

```
{
  "[LambdaArn](#cfn-cognito-userpool-customsmssender-lambdaarn)" : String,
  "[LambdaVersion](#cfn-cognito-userpool-customsmssender-lambdaversion)" : String
}
```

### YAML
<a name="aws-properties-cognito-userpool-customsmssender-syntax.yaml"></a>

```
  [LambdaArn](#cfn-cognito-userpool-customsmssender-lambdaarn): String
  [LambdaVersion](#cfn-cognito-userpool-customsmssender-lambdaversion): String
```

## Properties
<a name="aws-properties-cognito-userpool-customsmssender-properties"></a>

`LambdaArn`  <a name="cfn-cognito-userpool-customsmssender-lambdaarn"></a>
The Amazon Resource Name (ARN) of the function that you want to assign to your Lambda trigger.  
*Required*: No  
*Type*: String  
*Pattern*: `arn:[\w+=/,.@-]+:[\w+=/,.@-]+:([\w+=/,.@-]*)?:[0-9]+:[\w+=/,.@-]+(:[\w+=/,.@-]+)?(:[\w+=/,.@-]+)?`  
*Minimum*: `20`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LambdaVersion`  <a name="cfn-cognito-userpool-customsmssender-lambdaversion"></a>
The user pool trigger version of the request that Amazon Cognito sends to your Lambda function. Higher-numbered versions add fields that support new features.  
You must use a `LambdaVersion` of `V1_0` with a custom sender function.  
*Required*: No  
*Type*: String  
*Allowed values*: `V1_0`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::UserPool DeviceConfiguration
<a name="aws-properties-cognito-userpool-deviceconfiguration"></a>

The device-remembering configuration for a user pool.

## Syntax
<a name="aws-properties-cognito-userpool-deviceconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpool-deviceconfiguration-syntax.json"></a>

```
{
  "[ChallengeRequiredOnNewDevice](#cfn-cognito-userpool-deviceconfiguration-challengerequiredonnewdevice)" : Boolean,
  "[DeviceOnlyRememberedOnUserPrompt](#cfn-cognito-userpool-deviceconfiguration-deviceonlyrememberedonuserprompt)" : Boolean
}
```

### YAML
<a name="aws-properties-cognito-userpool-deviceconfiguration-syntax.yaml"></a>

```
  [ChallengeRequiredOnNewDevice](#cfn-cognito-userpool-deviceconfiguration-challengerequiredonnewdevice): Boolean
  [DeviceOnlyRememberedOnUserPrompt](#cfn-cognito-userpool-deviceconfiguration-deviceonlyrememberedonuserprompt): Boolean
```

## Properties
<a name="aws-properties-cognito-userpool-deviceconfiguration-properties"></a>

`ChallengeRequiredOnNewDevice`  <a name="cfn-cognito-userpool-deviceconfiguration-challengerequiredonnewdevice"></a>
When true, a remembered device can sign in with device authentication instead of SMS and time-based one-time password (TOTP) factors for multi-factor authentication (MFA).  
Whether or not `ChallengeRequiredOnNewDevice` is true, users who sign in with devices that have not been confirmed or remembered must still provide a second factor in a user pool that requires MFA.
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DeviceOnlyRememberedOnUserPrompt`  <a name="cfn-cognito-userpool-deviceconfiguration-deviceonlyrememberedonuserprompt"></a>
When true, Amazon Cognito doesn't automatically remember a user's device when your app sends a `ConfirmDevice` API request. In your app, create a prompt for your user to choose whether they want to remember their device. Return the user's choice in an `UpdateDeviceStatus` API request.  
When `DeviceOnlyRememberedOnUserPrompt` is `false`, Amazon Cognito immediately remembers devices that you register in a `ConfirmDevice` API request.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::UserPool EmailConfiguration
<a name="aws-properties-cognito-userpool-emailconfiguration"></a>

The email configuration of your user pool. The email configuration type sets your preferred sending method, AWS Region, and sender for messages from your user pool.

## Syntax
<a name="aws-properties-cognito-userpool-emailconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpool-emailconfiguration-syntax.json"></a>

```
{
  "[ConfigurationSet](#cfn-cognito-userpool-emailconfiguration-configurationset)" : String,
  "[EmailSendingAccount](#cfn-cognito-userpool-emailconfiguration-emailsendingaccount)" : String,
  "[From](#cfn-cognito-userpool-emailconfiguration-from)" : String,
  "[ReplyToEmailAddress](#cfn-cognito-userpool-emailconfiguration-replytoemailaddress)" : String,
  "[SourceArn](#cfn-cognito-userpool-emailconfiguration-sourcearn)" : String
}
```

### YAML
<a name="aws-properties-cognito-userpool-emailconfiguration-syntax.yaml"></a>

```
  [ConfigurationSet](#cfn-cognito-userpool-emailconfiguration-configurationset): String
  [EmailSendingAccount](#cfn-cognito-userpool-emailconfiguration-emailsendingaccount): String
  [From](#cfn-cognito-userpool-emailconfiguration-from): String
  [ReplyToEmailAddress](#cfn-cognito-userpool-emailconfiguration-replytoemailaddress): String
  [SourceArn](#cfn-cognito-userpool-emailconfiguration-sourcearn): String
```

## Properties
<a name="aws-properties-cognito-userpool-emailconfiguration-properties"></a>

`ConfigurationSet`  <a name="cfn-cognito-userpool-emailconfiguration-configurationset"></a>
The set of configuration rules that can be applied to emails sent using Amazon Simple Email Service. A configuration set is applied to an email by including a reference to the configuration set in the headers of the email. Once applied, all of the rules in that configuration set are applied to the email. Configuration sets can be used to apply the following types of rules to emails:     
Event publishing  
Amazon Simple Email Service can track the number of send, delivery, open, click, bounce, and complaint events for each email sent. Use event publishing to send information about these events to other AWS services such as and Amazon CloudWatch  
IP pool management  
When leasing dedicated IP addresses with Amazon Simple Email Service, you can create groups of IP addresses, called dedicated IP pools. You can then associate the dedicated IP pools with configuration sets.
*Required*: No  
*Type*: String  
*Pattern*: `^[a-zA-Z0-9_-]+$`  
*Minimum*: `1`  
*Maximum*: `64`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EmailSendingAccount`  <a name="cfn-cognito-userpool-emailconfiguration-emailsendingaccount"></a>
Specifies whether Amazon Cognito uses its built-in functionality to send your users email messages, or uses your Amazon Simple Email Service email configuration. Specify one of the following values:    
COGNITO\$1DEFAULT  
When Amazon Cognito emails your users, it uses its built-in email functionality. When you use the default option, Amazon Cognito allows only a limited number of emails each day for your user pool. For typical production environments, the default email limit is less than the required delivery volume. To achieve a higher delivery volume, specify DEVELOPER to use your Amazon SES email configuration.  
To look up the email delivery limit for the default option, see [Limits](https://docs.aws.amazon.com/cognito/latest/developerguide/limits.html) in the *Amazon Cognito Developer Guide*.  
The default FROM address is `no-reply@verificationemail.com`. To customize the FROM address, provide the Amazon Resource Name (ARN) of an Amazon SES verified email address for the `SourceArn` parameter.  
DEVELOPER  
When Amazon Cognito emails your users, it uses your Amazon SES configuration. Amazon Cognito calls Amazon SES on your behalf to send email from your verified email address. When you use this option, the email delivery limits are the same limits that apply to your Amazon SES verified email address in your AWS account.  
If you use this option, provide the ARN of an Amazon SES verified email address for the `SourceArn` parameter.  
Before Amazon Cognito can email your users, it requires additional permissions to call Amazon SES on your behalf. When you update your user pool with this option, Amazon Cognito creates a *service-linked role*, which is a type of role in your AWS account. This role contains the permissions that allow you to access Amazon SES and send email messages from your email address. For more information about the service-linked role that Amazon Cognito creates, see [Using Service-Linked Roles for Amazon Cognito](https://docs.aws.amazon.com/cognito/latest/developerguide/using-service-linked-roles.html) in the *Amazon Cognito Developer Guide*.
*Required*: No  
*Type*: String  
*Allowed values*: `COGNITO_DEFAULT | DEVELOPER`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`From`  <a name="cfn-cognito-userpool-emailconfiguration-from"></a>
Either the sender’s email address or the sender’s name with their email address. For example, `testuser@example.com` or `Test User <testuser@example.com>`. This address appears before the body of the email.  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `131072`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ReplyToEmailAddress`  <a name="cfn-cognito-userpool-emailconfiguration-replytoemailaddress"></a>
The destination to which the receiver of the email should reply.  
*Required*: No  
*Type*: String  
*Pattern*: `[\p{L}\p{M}\p{S}\p{N}\p{P}]+@[\p{L}\p{M}\p{S}\p{N}\p{P}]+`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SourceArn`  <a name="cfn-cognito-userpool-emailconfiguration-sourcearn"></a>
The ARN of a verified email address or an address from a verified domain in Amazon SES. You can set a `SourceArn` email from a verified domain only with an API request. You can set a verified email address, but not an address in a verified domain, in the Amazon Cognito console. Amazon Cognito uses the email address that you provide in one of the following ways, depending on the value that you specify for the `EmailSendingAccount` parameter:  
+ If you specify `COGNITO_DEFAULT`, Amazon Cognito uses this address as the custom FROM address when it emails your users using its built-in email account.
+ If you specify `DEVELOPER`, Amazon Cognito emails your users with this address by calling Amazon SES on your behalf.
The Region value of the `SourceArn` parameter must indicate a supported AWS Region of your user pool. Typically, the Region in the `SourceArn` and the user pool Region are the same. For more information, see [Amazon SES email configuration regions](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-email.html#user-pool-email-developer-region-mapping) in the [Amazon Cognito Developer Guide](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools.html).  
*Required*: No  
*Type*: String  
*Pattern*: `arn:[\w+=/,.@-]+:[\w+=/,.@-]+:([\w+=/,.@-]*)?:[0-9]+:[\w+=/,.@-]+(:[\w+=/,.@-]+)?(:[\w+=/,.@-]+)?`  
*Minimum*: `20`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::UserPool InboundFederation
<a name="aws-properties-cognito-userpool-inboundfederation"></a>

<a name="aws-properties-cognito-userpool-inboundfederation-description"></a>The `InboundFederation` property type specifies Property description not available. for an [AWS::Cognito::UserPool](aws-resource-cognito-userpool.md).

## Syntax
<a name="aws-properties-cognito-userpool-inboundfederation-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpool-inboundfederation-syntax.json"></a>

```
{
  "[LambdaArn](#cfn-cognito-userpool-inboundfederation-lambdaarn)" : String,
  "[LambdaVersion](#cfn-cognito-userpool-inboundfederation-lambdaversion)" : String
}
```

### YAML
<a name="aws-properties-cognito-userpool-inboundfederation-syntax.yaml"></a>

```
  [LambdaArn](#cfn-cognito-userpool-inboundfederation-lambdaarn): String
  [LambdaVersion](#cfn-cognito-userpool-inboundfederation-lambdaversion): String
```

## Properties
<a name="aws-properties-cognito-userpool-inboundfederation-properties"></a>

`LambdaArn`  <a name="cfn-cognito-userpool-inboundfederation-lambdaarn"></a>
Property description not available.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LambdaVersion`  <a name="cfn-cognito-userpool-inboundfederation-lambdaversion"></a>
Property description not available.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::UserPool InviteMessageTemplate
<a name="aws-properties-cognito-userpool-invitemessagetemplate"></a>

The template for the welcome message to new users. This template must include the `{####}` temporary password placeholder if you are creating users with passwords. If your users don't have passwords, you can omit the placeholder.

See also [Customizing User Invitation Messages](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pool-settings-message-customizations.html#cognito-user-pool-settings-user-invitation-message-customization).

## Syntax
<a name="aws-properties-cognito-userpool-invitemessagetemplate-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpool-invitemessagetemplate-syntax.json"></a>

```
{
  "[EmailMessage](#cfn-cognito-userpool-invitemessagetemplate-emailmessage)" : String,
  "[EmailSubject](#cfn-cognito-userpool-invitemessagetemplate-emailsubject)" : String,
  "[SMSMessage](#cfn-cognito-userpool-invitemessagetemplate-smsmessage)" : String
}
```

### YAML
<a name="aws-properties-cognito-userpool-invitemessagetemplate-syntax.yaml"></a>

```
  [EmailMessage](#cfn-cognito-userpool-invitemessagetemplate-emailmessage): String
  [EmailSubject](#cfn-cognito-userpool-invitemessagetemplate-emailsubject): String
  [SMSMessage](#cfn-cognito-userpool-invitemessagetemplate-smsmessage): String
```

## Properties
<a name="aws-properties-cognito-userpool-invitemessagetemplate-properties"></a>

`EmailMessage`  <a name="cfn-cognito-userpool-invitemessagetemplate-emailmessage"></a>
The message template for email messages. EmailMessage is allowed only if [EmailSendingAccount](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_EmailConfigurationType.html#CognitoUserPools-Type-EmailConfigurationType-EmailSendingAccount) is DEVELOPER.   
*Required*: No  
*Type*: String  
*Pattern*: `[\p{L}\p{M}\p{S}\p{N}\p{P}\s*]*`  
*Minimum*: `6`  
*Maximum*: `20000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EmailSubject`  <a name="cfn-cognito-userpool-invitemessagetemplate-emailsubject"></a>
The subject line for email messages. EmailSubject is allowed only if [EmailSendingAccount](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_EmailConfigurationType.html#CognitoUserPools-Type-EmailConfigurationType-EmailSendingAccount) is DEVELOPER.   
*Required*: No  
*Type*: String  
*Pattern*: `[\p{L}\p{M}\p{S}\p{N}\p{P}\s]+`  
*Minimum*: `1`  
*Maximum*: `140`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SMSMessage`  <a name="cfn-cognito-userpool-invitemessagetemplate-smsmessage"></a>
The message template for SMS messages.  
*Required*: No  
*Type*: String  
*Pattern*: `(?s).*`  
*Minimum*: `6`  
*Maximum*: `140`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::UserPool LambdaConfig
<a name="aws-properties-cognito-userpool-lambdaconfig"></a>

A collection of user pool Lambda triggers. Amazon Cognito invokes triggers at several possible stages of user pool operations. Triggers can modify the outcome of the operations that invoked them.

## Syntax
<a name="aws-properties-cognito-userpool-lambdaconfig-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpool-lambdaconfig-syntax.json"></a>

```
{
  "[CreateAuthChallenge](#cfn-cognito-userpool-lambdaconfig-createauthchallenge)" : String,
  "[CustomEmailSender](#cfn-cognito-userpool-lambdaconfig-customemailsender)" : CustomEmailSender,
  "[CustomMessage](#cfn-cognito-userpool-lambdaconfig-custommessage)" : String,
  "[CustomSMSSender](#cfn-cognito-userpool-lambdaconfig-customsmssender)" : CustomSMSSender,
  "[DefineAuthChallenge](#cfn-cognito-userpool-lambdaconfig-defineauthchallenge)" : String,
  "[InboundFederation](#cfn-cognito-userpool-lambdaconfig-inboundfederation)" : InboundFederation,
  "[KMSKeyID](#cfn-cognito-userpool-lambdaconfig-kmskeyid)" : String,
  "[PostAuthentication](#cfn-cognito-userpool-lambdaconfig-postauthentication)" : String,
  "[PostConfirmation](#cfn-cognito-userpool-lambdaconfig-postconfirmation)" : String,
  "[PreAuthentication](#cfn-cognito-userpool-lambdaconfig-preauthentication)" : String,
  "[PreSignUp](#cfn-cognito-userpool-lambdaconfig-presignup)" : String,
  "[PreTokenGeneration](#cfn-cognito-userpool-lambdaconfig-pretokengeneration)" : String,
  "[PreTokenGenerationConfig](#cfn-cognito-userpool-lambdaconfig-pretokengenerationconfig)" : PreTokenGenerationConfig,
  "[UserMigration](#cfn-cognito-userpool-lambdaconfig-usermigration)" : String,
  "[VerifyAuthChallengeResponse](#cfn-cognito-userpool-lambdaconfig-verifyauthchallengeresponse)" : String
}
```

### YAML
<a name="aws-properties-cognito-userpool-lambdaconfig-syntax.yaml"></a>

```
  [CreateAuthChallenge](#cfn-cognito-userpool-lambdaconfig-createauthchallenge): String
  [CustomEmailSender](#cfn-cognito-userpool-lambdaconfig-customemailsender): 
    CustomEmailSender
  [CustomMessage](#cfn-cognito-userpool-lambdaconfig-custommessage): String
  [CustomSMSSender](#cfn-cognito-userpool-lambdaconfig-customsmssender): 
    CustomSMSSender
  [DefineAuthChallenge](#cfn-cognito-userpool-lambdaconfig-defineauthchallenge): String
  [InboundFederation](#cfn-cognito-userpool-lambdaconfig-inboundfederation): 
    InboundFederation
  [KMSKeyID](#cfn-cognito-userpool-lambdaconfig-kmskeyid): String
  [PostAuthentication](#cfn-cognito-userpool-lambdaconfig-postauthentication): String
  [PostConfirmation](#cfn-cognito-userpool-lambdaconfig-postconfirmation): String
  [PreAuthentication](#cfn-cognito-userpool-lambdaconfig-preauthentication): String
  [PreSignUp](#cfn-cognito-userpool-lambdaconfig-presignup): String
  [PreTokenGeneration](#cfn-cognito-userpool-lambdaconfig-pretokengeneration): String
  [PreTokenGenerationConfig](#cfn-cognito-userpool-lambdaconfig-pretokengenerationconfig): 
    PreTokenGenerationConfig
  [UserMigration](#cfn-cognito-userpool-lambdaconfig-usermigration): String
  [VerifyAuthChallengeResponse](#cfn-cognito-userpool-lambdaconfig-verifyauthchallengeresponse): String
```

## Properties
<a name="aws-properties-cognito-userpool-lambdaconfig-properties"></a>

`CreateAuthChallenge`  <a name="cfn-cognito-userpool-lambdaconfig-createauthchallenge"></a>
The configuration of a create auth challenge Lambda trigger, one of three triggers in the sequence of the [custom authentication challenge triggers](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-challenge.html).  
*Required*: No  
*Type*: String  
*Pattern*: `arn:[\w+=/,.@-]+:[\w+=/,.@-]+:([\w+=/,.@-]*)?:[0-9]+:[\w+=/,.@-]+(:[\w+=/,.@-]+)?(:[\w+=/,.@-]+)?`  
*Minimum*: `20`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CustomEmailSender`  <a name="cfn-cognito-userpool-lambdaconfig-customemailsender"></a>
The configuration of a custom email sender Lambda trigger. This trigger routes all email notifications from a user pool to a Lambda function that delivers the message using custom logic.  
*Required*: No  
*Type*: [CustomEmailSender](aws-properties-cognito-userpool-customemailsender.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CustomMessage`  <a name="cfn-cognito-userpool-lambdaconfig-custommessage"></a>
A custom message Lambda trigger. This trigger is an opportunity to customize all SMS and email messages from your user pool. When a custom message trigger is active, your user pool routes all messages to a Lambda function that returns a runtime-customized message subject and body for your user pool to deliver to a user.  
*Required*: No  
*Type*: String  
*Pattern*: `arn:[\w+=/,.@-]+:[\w+=/,.@-]+:([\w+=/,.@-]*)?:[0-9]+:[\w+=/,.@-]+(:[\w+=/,.@-]+)?(:[\w+=/,.@-]+)?`  
*Minimum*: `20`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CustomSMSSender`  <a name="cfn-cognito-userpool-lambdaconfig-customsmssender"></a>
The configuration of a custom SMS sender Lambda trigger. This trigger routes all SMS notifications from a user pool to a Lambda function that delivers the message using custom logic.  
*Required*: No  
*Type*: [CustomSMSSender](aws-properties-cognito-userpool-customsmssender.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DefineAuthChallenge`  <a name="cfn-cognito-userpool-lambdaconfig-defineauthchallenge"></a>
The configuration of a define auth challenge Lambda trigger, one of three triggers in the sequence of the [custom authentication challenge triggers](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-challenge.html).  
*Required*: No  
*Type*: String  
*Pattern*: `arn:[\w+=/,.@-]+:[\w+=/,.@-]+:([\w+=/,.@-]*)?:[0-9]+:[\w+=/,.@-]+(:[\w+=/,.@-]+)?(:[\w+=/,.@-]+)?`  
*Minimum*: `20`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`InboundFederation`  <a name="cfn-cognito-userpool-lambdaconfig-inboundfederation"></a>
Property description not available.  
*Required*: No  
*Type*: [InboundFederation](aws-properties-cognito-userpool-inboundfederation.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`KMSKeyID`  <a name="cfn-cognito-userpool-lambdaconfig-kmskeyid"></a>
The ARN of an [KMS key](https://docs.aws.amazon.com//kms/latest/developerguide/concepts.html#master_keys). Amazon Cognito uses the key to encrypt codes and temporary passwords sent to custom sender Lambda triggers.  
*Required*: No  
*Type*: String  
*Pattern*: `arn:[\w+=/,.@-]+:[\w+=/,.@-]+:([\w+=/,.@-]*)?:[0-9]+:[\w+=/,.@-]+(:[\w+=/,.@-]+)?(:[\w+=/,.@-]+)?`  
*Minimum*: `20`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PostAuthentication`  <a name="cfn-cognito-userpool-lambdaconfig-postauthentication"></a>
The configuration of a [post authentication Lambda trigger](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-post-authentication.html) in a user pool. This trigger can take custom actions after a user signs in.  
*Required*: No  
*Type*: String  
*Pattern*: `arn:[\w+=/,.@-]+:[\w+=/,.@-]+:([\w+=/,.@-]*)?:[0-9]+:[\w+=/,.@-]+(:[\w+=/,.@-]+)?(:[\w+=/,.@-]+)?`  
*Minimum*: `20`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PostConfirmation`  <a name="cfn-cognito-userpool-lambdaconfig-postconfirmation"></a>
The configuration of a [post confirmation Lambda trigger](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-post-confirmation.html) in a user pool. This trigger can take custom actions after a user confirms their user account and their email address or phone number.  
*Required*: No  
*Type*: String  
*Pattern*: `arn:[\w+=/,.@-]+:[\w+=/,.@-]+:([\w+=/,.@-]*)?:[0-9]+:[\w+=/,.@-]+(:[\w+=/,.@-]+)?(:[\w+=/,.@-]+)?`  
*Minimum*: `20`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PreAuthentication`  <a name="cfn-cognito-userpool-lambdaconfig-preauthentication"></a>
The configuration of a [pre authentication trigger](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-authentication.html) in a user pool. This trigger can evaluate and modify user sign-in events.  
*Required*: No  
*Type*: String  
*Pattern*: `arn:[\w+=/,.@-]+:[\w+=/,.@-]+:([\w+=/,.@-]*)?:[0-9]+:[\w+=/,.@-]+(:[\w+=/,.@-]+)?(:[\w+=/,.@-]+)?`  
*Minimum*: `20`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PreSignUp`  <a name="cfn-cognito-userpool-lambdaconfig-presignup"></a>
The configuration of a [pre sign-up Lambda trigger](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-sign-up.html) in a user pool. This trigger evaluates new users and can bypass confirmation, [link a federated user profile](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-identity-federation-consolidate-users.html), or block sign-up requests.  
*Required*: No  
*Type*: String  
*Pattern*: `arn:[\w+=/,.@-]+:[\w+=/,.@-]+:([\w+=/,.@-]*)?:[0-9]+:[\w+=/,.@-]+(:[\w+=/,.@-]+)?(:[\w+=/,.@-]+)?`  
*Minimum*: `20`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PreTokenGeneration`  <a name="cfn-cognito-userpool-lambdaconfig-pretokengeneration"></a>
The legacy configuration of a [pre token generation Lambda trigger](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-token-generation.html) in a user pool.  
Set this parameter for legacy purposes. If you also set an ARN in `PreTokenGenerationConfig`, its value must be identical to `PreTokenGeneration`. For new instances of pre token generation triggers, set the `LambdaArn` of `PreTokenGenerationConfig`.  
*Required*: No  
*Type*: String  
*Pattern*: `arn:[\w+=/,.@-]+:[\w+=/,.@-]+:([\w+=/,.@-]*)?:[0-9]+:[\w+=/,.@-]+(:[\w+=/,.@-]+)?(:[\w+=/,.@-]+)?`  
*Minimum*: `20`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PreTokenGenerationConfig`  <a name="cfn-cognito-userpool-lambdaconfig-pretokengenerationconfig"></a>
The detailed configuration of a [pre token generation Lambda trigger](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-token-generation.html) in a user pool. If you also set an ARN in `PreTokenGeneration`, its value must be identical to `PreTokenGenerationConfig`.  
*Required*: No  
*Type*: [PreTokenGenerationConfig](aws-properties-cognito-userpool-pretokengenerationconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`UserMigration`  <a name="cfn-cognito-userpool-lambdaconfig-usermigration"></a>
The configuration of a [migrate user Lambda trigger](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-migrate-user.html) in a user pool. This trigger can create user profiles when users sign in or attempt to reset their password with credentials that don't exist yet.  
*Required*: No  
*Type*: String  
*Pattern*: `arn:[\w+=/,.@-]+:[\w+=/,.@-]+:([\w+=/,.@-]*)?:[0-9]+:[\w+=/,.@-]+(:[\w+=/,.@-]+)?(:[\w+=/,.@-]+)?`  
*Minimum*: `20`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`VerifyAuthChallengeResponse`  <a name="cfn-cognito-userpool-lambdaconfig-verifyauthchallengeresponse"></a>
The configuration of a verify auth challenge Lambda trigger, one of three triggers in the sequence of the [custom authentication challenge triggers](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-challenge.html).  
*Required*: No  
*Type*: String  
*Pattern*: `arn:[\w+=/,.@-]+:[\w+=/,.@-]+:([\w+=/,.@-]*)?:[0-9]+:[\w+=/,.@-]+(:[\w+=/,.@-]+)?(:[\w+=/,.@-]+)?`  
*Minimum*: `20`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::UserPool NumberAttributeConstraints
<a name="aws-properties-cognito-userpool-numberattributeconstraints"></a>

The minimum and maximum values of an attribute that is of the number type, for example `custom:age`.

## Syntax
<a name="aws-properties-cognito-userpool-numberattributeconstraints-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpool-numberattributeconstraints-syntax.json"></a>

```
{
  "[MaxValue](#cfn-cognito-userpool-numberattributeconstraints-maxvalue)" : String,
  "[MinValue](#cfn-cognito-userpool-numberattributeconstraints-minvalue)" : String
}
```

### YAML
<a name="aws-properties-cognito-userpool-numberattributeconstraints-syntax.yaml"></a>

```
  [MaxValue](#cfn-cognito-userpool-numberattributeconstraints-maxvalue): String
  [MinValue](#cfn-cognito-userpool-numberattributeconstraints-minvalue): String
```

## Properties
<a name="aws-properties-cognito-userpool-numberattributeconstraints-properties"></a>

`MaxValue`  <a name="cfn-cognito-userpool-numberattributeconstraints-maxvalue"></a>
The maximum length of a number attribute value. Must be a number less than or equal to `2^1023`, represented as a string with a length of 131072 characters or fewer.  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `131072`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MinValue`  <a name="cfn-cognito-userpool-numberattributeconstraints-minvalue"></a>
The minimum value of an attribute that is of the number data type.  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `131072`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::UserPool PasswordPolicy
<a name="aws-properties-cognito-userpool-passwordpolicy"></a>

The password policy settings for a user pool, including complexity, history, and length requirements.

## Syntax
<a name="aws-properties-cognito-userpool-passwordpolicy-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpool-passwordpolicy-syntax.json"></a>

```
{
  "[MinimumLength](#cfn-cognito-userpool-passwordpolicy-minimumlength)" : Integer,
  "[PasswordHistorySize](#cfn-cognito-userpool-passwordpolicy-passwordhistorysize)" : Integer,
  "[RequireLowercase](#cfn-cognito-userpool-passwordpolicy-requirelowercase)" : Boolean,
  "[RequireNumbers](#cfn-cognito-userpool-passwordpolicy-requirenumbers)" : Boolean,
  "[RequireSymbols](#cfn-cognito-userpool-passwordpolicy-requiresymbols)" : Boolean,
  "[RequireUppercase](#cfn-cognito-userpool-passwordpolicy-requireuppercase)" : Boolean,
  "[TemporaryPasswordValidityDays](#cfn-cognito-userpool-passwordpolicy-temporarypasswordvaliditydays)" : Integer
}
```

### YAML
<a name="aws-properties-cognito-userpool-passwordpolicy-syntax.yaml"></a>

```
  [MinimumLength](#cfn-cognito-userpool-passwordpolicy-minimumlength): Integer
  [PasswordHistorySize](#cfn-cognito-userpool-passwordpolicy-passwordhistorysize): Integer
  [RequireLowercase](#cfn-cognito-userpool-passwordpolicy-requirelowercase): Boolean
  [RequireNumbers](#cfn-cognito-userpool-passwordpolicy-requirenumbers): Boolean
  [RequireSymbols](#cfn-cognito-userpool-passwordpolicy-requiresymbols): Boolean
  [RequireUppercase](#cfn-cognito-userpool-passwordpolicy-requireuppercase): Boolean
  [TemporaryPasswordValidityDays](#cfn-cognito-userpool-passwordpolicy-temporarypasswordvaliditydays): Integer
```

## Properties
<a name="aws-properties-cognito-userpool-passwordpolicy-properties"></a>

`MinimumLength`  <a name="cfn-cognito-userpool-passwordpolicy-minimumlength"></a>
The minimum length of the password in the policy that you have set. This value can't be less than 6.  
*Required*: No  
*Type*: Integer  
*Minimum*: `6`  
*Maximum*: `99`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PasswordHistorySize`  <a name="cfn-cognito-userpool-passwordpolicy-passwordhistorysize"></a>
The number of previous passwords that you want Amazon Cognito to restrict each user from reusing. Users can't set a password that matches any of `n` previous passwords, where `n` is the value of `PasswordHistorySize`.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Maximum*: `24`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RequireLowercase`  <a name="cfn-cognito-userpool-passwordpolicy-requirelowercase"></a>
The requirement in a password policy that users must include at least one lowercase letter in their password.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RequireNumbers`  <a name="cfn-cognito-userpool-passwordpolicy-requirenumbers"></a>
The requirement in a password policy that users must include at least one number in their password.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RequireSymbols`  <a name="cfn-cognito-userpool-passwordpolicy-requiresymbols"></a>
The requirement in a password policy that users must include at least one symbol in their password.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RequireUppercase`  <a name="cfn-cognito-userpool-passwordpolicy-requireuppercase"></a>
The requirement in a password policy that users must include at least one uppercase letter in their password.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TemporaryPasswordValidityDays`  <a name="cfn-cognito-userpool-passwordpolicy-temporarypasswordvaliditydays"></a>
The number of days a temporary password is valid in the password policy. If the user doesn't sign in during this time, an administrator must reset their password. Defaults to `7`. If you submit a value of `0`, Amazon Cognito treats it as a null value and sets `TemporaryPasswordValidityDays` to its default value.  
When you set `TemporaryPasswordValidityDays` for a user pool, you can no longer set a value for the legacy `UnusedAccountValidityDays` parameter in that user pool.
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Maximum*: `365`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::UserPool Policies
<a name="aws-properties-cognito-userpool-policies"></a>

A list of user pool policies. Contains the policy that sets password-complexity requirements.

## Syntax
<a name="aws-properties-cognito-userpool-policies-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpool-policies-syntax.json"></a>

```
{
  "[PasswordPolicy](#cfn-cognito-userpool-policies-passwordpolicy)" : PasswordPolicy,
  "[SignInPolicy](#cfn-cognito-userpool-policies-signinpolicy)" : SignInPolicy
}
```

### YAML
<a name="aws-properties-cognito-userpool-policies-syntax.yaml"></a>

```
  [PasswordPolicy](#cfn-cognito-userpool-policies-passwordpolicy): 
    PasswordPolicy
  [SignInPolicy](#cfn-cognito-userpool-policies-signinpolicy): 
    SignInPolicy
```

## Properties
<a name="aws-properties-cognito-userpool-policies-properties"></a>

`PasswordPolicy`  <a name="cfn-cognito-userpool-policies-passwordpolicy"></a>
The password policy settings for a user pool, including complexity, history, and length requirements.  
*Required*: No  
*Type*: [PasswordPolicy](aws-properties-cognito-userpool-passwordpolicy.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SignInPolicy`  <a name="cfn-cognito-userpool-policies-signinpolicy"></a>
The policy for allowed types of authentication in a user pool. To activate this setting, your user pool must be in the [ Essentials tier](https://docs.aws.amazon.com/cognito/latest/developerguide/feature-plans-features-essentials.html) or higher.  
*Required*: No  
*Type*: [SignInPolicy](aws-properties-cognito-userpool-signinpolicy.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::UserPool PreTokenGenerationConfig
<a name="aws-properties-cognito-userpool-pretokengenerationconfig"></a>

The properties of a pre token generation Lambda trigger.

## Syntax
<a name="aws-properties-cognito-userpool-pretokengenerationconfig-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpool-pretokengenerationconfig-syntax.json"></a>

```
{
  "[LambdaArn](#cfn-cognito-userpool-pretokengenerationconfig-lambdaarn)" : String,
  "[LambdaVersion](#cfn-cognito-userpool-pretokengenerationconfig-lambdaversion)" : String
}
```

### YAML
<a name="aws-properties-cognito-userpool-pretokengenerationconfig-syntax.yaml"></a>

```
  [LambdaArn](#cfn-cognito-userpool-pretokengenerationconfig-lambdaarn): String
  [LambdaVersion](#cfn-cognito-userpool-pretokengenerationconfig-lambdaversion): String
```

## Properties
<a name="aws-properties-cognito-userpool-pretokengenerationconfig-properties"></a>

`LambdaArn`  <a name="cfn-cognito-userpool-pretokengenerationconfig-lambdaarn"></a>
The Amazon Resource Name (ARN) of the function that you want to assign to your Lambda trigger.  
This parameter and the `PreTokenGeneration` property of `LambdaConfig` have the same value. For new instances of pre token generation triggers, set `LambdaArn`.  
*Required*: No  
*Type*: String  
*Pattern*: `arn:[\w+=/,.@-]+:[\w+=/,.@-]+:([\w+=/,.@-]*)?:[0-9]+:[\w+=/,.@-]+(:[\w+=/,.@-]+)?(:[\w+=/,.@-]+)?`  
*Minimum*: `20`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LambdaVersion`  <a name="cfn-cognito-userpool-pretokengenerationconfig-lambdaversion"></a>
The user pool trigger version of the request that Amazon Cognito sends to your Lambda function. Higher-numbered versions add fields that support new features.  
*Required*: No  
*Type*: String  
*Allowed values*: `V1_0 | V2_0 | V3_0`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::UserPool RecoveryOption
<a name="aws-properties-cognito-userpool-recoveryoption"></a>

A recovery option for a user. The `AccountRecoverySettingType` data type is an array of this object. Each `RecoveryOptionType` has a priority property that determines whether it is a primary or secondary option.

For example, if `verified_email` has a priority of `1` and `verified_phone_number` has a priority of `2`, your user pool sends account-recovery messages to a verified email address but falls back to an SMS message if the user has a verified phone number. The `admin_only` option prevents self-service account recovery.

## Syntax
<a name="aws-properties-cognito-userpool-recoveryoption-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpool-recoveryoption-syntax.json"></a>

```
{
  "[Name](#cfn-cognito-userpool-recoveryoption-name)" : String,
  "[Priority](#cfn-cognito-userpool-recoveryoption-priority)" : Integer
}
```

### YAML
<a name="aws-properties-cognito-userpool-recoveryoption-syntax.yaml"></a>

```
  [Name](#cfn-cognito-userpool-recoveryoption-name): String
  [Priority](#cfn-cognito-userpool-recoveryoption-priority): Integer
```

## Properties
<a name="aws-properties-cognito-userpool-recoveryoption-properties"></a>

`Name`  <a name="cfn-cognito-userpool-recoveryoption-name"></a>
The recovery method that this object sets a recovery option for.  
*Required*: No  
*Type*: String  
*Allowed values*: `verified_email | verified_phone_number | admin_only`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Priority`  <a name="cfn-cognito-userpool-recoveryoption-priority"></a>
Your priority preference for using the specified attribute in account recovery. The highest priority is `1`.  
*Required*: No  
*Type*: Integer  
*Minimum*: `1`  
*Maximum*: `2`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::UserPool SchemaAttribute
<a name="aws-properties-cognito-userpool-schemaattribute"></a>

A list of the user attributes and their properties in your user pool. The attribute schema contains standard attributes, custom attributes with a `custom:` prefix, and developer attributes with a `dev:` prefix. For more information, see [User pool attributes](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-attributes.html).

Developer-only `dev:` attributes are a legacy feature of user pools, and are read-only to all app clients. You can create and update developer-only attributes only with IAM-authenticated API operations. Use app client read/write permissions instead.

## Syntax
<a name="aws-properties-cognito-userpool-schemaattribute-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpool-schemaattribute-syntax.json"></a>

```
{
  "[AttributeDataType](#cfn-cognito-userpool-schemaattribute-attributedatatype)" : String,
  "[DeveloperOnlyAttribute](#cfn-cognito-userpool-schemaattribute-developeronlyattribute)" : Boolean,
  "[Mutable](#cfn-cognito-userpool-schemaattribute-mutable)" : Boolean,
  "[Name](#cfn-cognito-userpool-schemaattribute-name)" : String,
  "[NumberAttributeConstraints](#cfn-cognito-userpool-schemaattribute-numberattributeconstraints)" : NumberAttributeConstraints,
  "[Required](#cfn-cognito-userpool-schemaattribute-required)" : Boolean,
  "[StringAttributeConstraints](#cfn-cognito-userpool-schemaattribute-stringattributeconstraints)" : StringAttributeConstraints
}
```

### YAML
<a name="aws-properties-cognito-userpool-schemaattribute-syntax.yaml"></a>

```
  [AttributeDataType](#cfn-cognito-userpool-schemaattribute-attributedatatype): String
  [DeveloperOnlyAttribute](#cfn-cognito-userpool-schemaattribute-developeronlyattribute): Boolean
  [Mutable](#cfn-cognito-userpool-schemaattribute-mutable): Boolean
  [Name](#cfn-cognito-userpool-schemaattribute-name): String
  [NumberAttributeConstraints](#cfn-cognito-userpool-schemaattribute-numberattributeconstraints): 
    NumberAttributeConstraints
  [Required](#cfn-cognito-userpool-schemaattribute-required): Boolean
  [StringAttributeConstraints](#cfn-cognito-userpool-schemaattribute-stringattributeconstraints): 
    StringAttributeConstraints
```

## Properties
<a name="aws-properties-cognito-userpool-schemaattribute-properties"></a>

`AttributeDataType`  <a name="cfn-cognito-userpool-schemaattribute-attributedatatype"></a>
The data format of the values for your attribute. When you choose an `AttributeDataType`, Amazon Cognito validates the input against the data type. A custom attribute value in your user's ID token is always a string, for example `"custom:isMember" : "true"` or `"custom:YearsAsMember" : "12"`.   
*Required*: No  
*Type*: String  
*Allowed values*: `String | Number | DateTime | Boolean`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DeveloperOnlyAttribute`  <a name="cfn-cognito-userpool-schemaattribute-developeronlyattribute"></a>
You should use [WriteAttributes](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UserPoolClientType.html#CognitoUserPools-Type-UserPoolClientType-WriteAttributes) in the user pool client to control how attributes can be mutated for new use cases instead of using `DeveloperOnlyAttribute`.
Specifies whether the attribute type is developer only. This attribute can only be modified by an administrator. Users won't be able to modify this attribute using their access token. For example, `DeveloperOnlyAttribute` can be modified using AdminUpdateUserAttributes but can't be updated using UpdateUserAttributes.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Mutable`  <a name="cfn-cognito-userpool-schemaattribute-mutable"></a>
Specifies whether the value of the attribute can be changed.  
Any user pool attribute whose value you map from an IdP attribute must be mutable, with a parameter value of `true`. Amazon Cognito updates mapped attributes when users sign in to your application through an IdP. If an attribute is immutable, Amazon Cognito throws an error when it attempts to update the attribute. For more information, see [Specifying Identity Provider Attribute Mappings for Your User Pool](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-specifying-attribute-mapping.html).  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Name`  <a name="cfn-cognito-userpool-schemaattribute-name"></a>
The name of your user pool attribute. When you create or update a user pool, adding a schema attribute creates a custom or developer-only attribute. When you add an attribute with a `Name` value of `MyAttribute`, Amazon Cognito creates the custom attribute `custom:MyAttribute`. When `DeveloperOnlyAttribute` is `true`, Amazon Cognito creates your attribute as `dev:MyAttribute`. In an operation that describes a user pool, Amazon Cognito returns this value as `value` for standard attributes, `custom:value` for custom attributes, and `dev:value` for developer-only attributes..  
*Required*: No  
*Type*: String  
*Pattern*: `[\p{L}\p{M}\p{S}\p{N}\p{P}]+`  
*Minimum*: `1`  
*Maximum*: `20`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`NumberAttributeConstraints`  <a name="cfn-cognito-userpool-schemaattribute-numberattributeconstraints"></a>
Specifies the constraints for an attribute of the number type.  
*Required*: No  
*Type*: [NumberAttributeConstraints](aws-properties-cognito-userpool-numberattributeconstraints.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Required`  <a name="cfn-cognito-userpool-schemaattribute-required"></a>
Specifies whether a user pool attribute is required. If the attribute is required and the user doesn't provide a value, registration or sign-in will fail.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`StringAttributeConstraints`  <a name="cfn-cognito-userpool-schemaattribute-stringattributeconstraints"></a>
Specifies the constraints for an attribute of the string type.  
*Required*: No  
*Type*: [StringAttributeConstraints](aws-properties-cognito-userpool-stringattributeconstraints.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::UserPool SignInPolicy
<a name="aws-properties-cognito-userpool-signinpolicy"></a>

The policy for allowed types of authentication in a user pool. To activate this setting, your user pool must be in the [ Essentials tier](https://docs.aws.amazon.com/cognito/latest/developerguide/feature-plans-features-essentials.html) or higher.

## Syntax
<a name="aws-properties-cognito-userpool-signinpolicy-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpool-signinpolicy-syntax.json"></a>

```
{
  "[AllowedFirstAuthFactors](#cfn-cognito-userpool-signinpolicy-allowedfirstauthfactors)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-cognito-userpool-signinpolicy-syntax.yaml"></a>

```
  [AllowedFirstAuthFactors](#cfn-cognito-userpool-signinpolicy-allowedfirstauthfactors): 
    - String
```

## Properties
<a name="aws-properties-cognito-userpool-signinpolicy-properties"></a>

`AllowedFirstAuthFactors`  <a name="cfn-cognito-userpool-signinpolicy-allowedfirstauthfactors"></a>
The sign-in methods that a user pool supports as the first factor. You can permit users to start authentication with a standard username and password, or with other one-time password and hardware factors.  
Supports values of `EMAIL_OTP`, `SMS_OTP`, `WEB_AUTHN` and `PASSWORD`,  
*Required*: No  
*Type*: Array of String  
*Minimum*: `1`  
*Maximum*: `4`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::UserPool SmsConfiguration
<a name="aws-properties-cognito-userpool-smsconfiguration"></a>

User pool configuration for delivery of SMS messages with Amazon Simple Notification Service. To send SMS messages with Amazon SNS in the AWS Region that you want, the Amazon Cognito user pool uses an AWS Identity and Access Management (IAM) role in your AWS account.

## Syntax
<a name="aws-properties-cognito-userpool-smsconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpool-smsconfiguration-syntax.json"></a>

```
{
  "[ExternalId](#cfn-cognito-userpool-smsconfiguration-externalid)" : String,
  "[SnsCallerArn](#cfn-cognito-userpool-smsconfiguration-snscallerarn)" : String,
  "[SnsRegion](#cfn-cognito-userpool-smsconfiguration-snsregion)" : String
}
```

### YAML
<a name="aws-properties-cognito-userpool-smsconfiguration-syntax.yaml"></a>

```
  [ExternalId](#cfn-cognito-userpool-smsconfiguration-externalid): String
  [SnsCallerArn](#cfn-cognito-userpool-smsconfiguration-snscallerarn): String
  [SnsRegion](#cfn-cognito-userpool-smsconfiguration-snsregion): String
```

## Properties
<a name="aws-properties-cognito-userpool-smsconfiguration-properties"></a>

`ExternalId`  <a name="cfn-cognito-userpool-smsconfiguration-externalid"></a>
The external ID provides additional security for your IAM role. You can use an `ExternalId` with the IAM role that you use with Amazon SNS to send SMS messages for your user pool. If you provide an `ExternalId`, your Amazon Cognito user pool includes it in the request to assume your IAM role. You can configure the role trust policy to require that Amazon Cognito, and any principal, provide the `ExternalID`. If you use the Amazon Cognito Management Console to create a role for SMS multi-factor authentication (MFA), Amazon Cognito creates a role with the required permissions and a trust policy that demonstrates use of the `ExternalId`.  
For more information about the `ExternalId` of a role, see [How to use an external ID when granting access to your AWS resources to a third party](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html).  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `131072`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SnsCallerArn`  <a name="cfn-cognito-userpool-smsconfiguration-snscallerarn"></a>
The Amazon Resource Name (ARN) of the Amazon SNS caller. This is the ARN of the IAM role in your AWS account that Amazon Cognito will use to send SMS messages. SMS messages are subject to a [spending limit](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-email-phone-verification.html).   
*Required*: No  
*Type*: String  
*Pattern*: `arn:[\w+=/,.@-]+:[\w+=/,.@-]+:([\w+=/,.@-]*)?:[0-9]+:[\w+=/,.@-]+(:[\w+=/,.@-]+)?(:[\w+=/,.@-]+)?`  
*Minimum*: `20`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SnsRegion`  <a name="cfn-cognito-userpool-smsconfiguration-snsregion"></a>
The AWS Region to use with Amazon SNS integration. You can choose the same Region as your user pool, or a supported **Legacy Amazon SNS alternate Region**.   
 Amazon Cognito resources in the Asia Pacific (Seoul) AWS Region must use your Amazon SNS configuration in the Asia Pacific (Tokyo) Region. For more information, see [SMS message settings for Amazon Cognito user pools](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-sms-settings.html).  
*Required*: No  
*Type*: String  
*Minimum*: `5`  
*Maximum*: `32`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::UserPool StringAttributeConstraints
<a name="aws-properties-cognito-userpool-stringattributeconstraints"></a>

The minimum and maximum length values of an attribute that is of the string type, for example `custom:department`.

## Syntax
<a name="aws-properties-cognito-userpool-stringattributeconstraints-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpool-stringattributeconstraints-syntax.json"></a>

```
{
  "[MaxLength](#cfn-cognito-userpool-stringattributeconstraints-maxlength)" : String,
  "[MinLength](#cfn-cognito-userpool-stringattributeconstraints-minlength)" : String
}
```

### YAML
<a name="aws-properties-cognito-userpool-stringattributeconstraints-syntax.yaml"></a>

```
  [MaxLength](#cfn-cognito-userpool-stringattributeconstraints-maxlength): String
  [MinLength](#cfn-cognito-userpool-stringattributeconstraints-minlength): String
```

## Properties
<a name="aws-properties-cognito-userpool-stringattributeconstraints-properties"></a>

`MaxLength`  <a name="cfn-cognito-userpool-stringattributeconstraints-maxlength"></a>
The maximum length of a string attribute value. Must be a number less than or equal to `2^1023`, represented as a string with a length of 131072 characters or fewer.  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `131072`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MinLength`  <a name="cfn-cognito-userpool-stringattributeconstraints-minlength"></a>
The minimum length of a string attribute value.  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `131072`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::UserPool UserAttributeUpdateSettings
<a name="aws-properties-cognito-userpool-userattributeupdatesettings"></a>

The settings for updates to user attributes. These settings include the property `AttributesRequireVerificationBeforeUpdate`, a user-pool setting that tells Amazon Cognito how to handle changes to the value of your users' email address and phone number attributes. For more information, see [ Verifying updates to email addresses and phone numbers](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-email-phone-verification.html#user-pool-settings-verifications-verify-attribute-updates).

## Syntax
<a name="aws-properties-cognito-userpool-userattributeupdatesettings-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpool-userattributeupdatesettings-syntax.json"></a>

```
{
  "[AttributesRequireVerificationBeforeUpdate](#cfn-cognito-userpool-userattributeupdatesettings-attributesrequireverificationbeforeupdate)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-cognito-userpool-userattributeupdatesettings-syntax.yaml"></a>

```
  [AttributesRequireVerificationBeforeUpdate](#cfn-cognito-userpool-userattributeupdatesettings-attributesrequireverificationbeforeupdate): 
    - String
```

## Properties
<a name="aws-properties-cognito-userpool-userattributeupdatesettings-properties"></a>

`AttributesRequireVerificationBeforeUpdate`  <a name="cfn-cognito-userpool-userattributeupdatesettings-attributesrequireverificationbeforeupdate"></a>
Requires that your user verifies their email address, phone number, or both before Amazon Cognito updates the value of that attribute. When you update a user attribute that has this option activated, Amazon Cognito sends a verification message to the new phone number or email address. Amazon Cognito doesn’t change the value of the attribute until your user responds to the verification message and confirms the new value.  
When `AttributesRequireVerificationBeforeUpdate` is false, your user pool doesn't require that your users verify attribute changes before Amazon Cognito updates them. In a user pool where `AttributesRequireVerificationBeforeUpdate` is false, API operations that change attribute values can immediately update a user’s `email` or `phone_number` attribute.  
*Required*: Yes  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::UserPool UsernameConfiguration
<a name="aws-properties-cognito-userpool-usernameconfiguration"></a>

Case sensitivity of the username input for the selected sign-in option. When case sensitivity is set to `False` (case insensitive), users can sign in with any combination of capital and lowercase letters. For example, `username`, `USERNAME`, or `UserName`, or for email, `email@example.com` or `EMaiL@eXamplE.Com`. For most use cases, set case sensitivity to `False` (case insensitive) as a best practice. When usernames and email addresses are case insensitive, Amazon Cognito treats any variation in case as the same user, and prevents a case variation from being assigned to the same attribute for a different user.

## Syntax
<a name="aws-properties-cognito-userpool-usernameconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpool-usernameconfiguration-syntax.json"></a>

```
{
  "[CaseSensitive](#cfn-cognito-userpool-usernameconfiguration-casesensitive)" : Boolean
}
```

### YAML
<a name="aws-properties-cognito-userpool-usernameconfiguration-syntax.yaml"></a>

```
  [CaseSensitive](#cfn-cognito-userpool-usernameconfiguration-casesensitive): Boolean
```

## Properties
<a name="aws-properties-cognito-userpool-usernameconfiguration-properties"></a>

`CaseSensitive`  <a name="cfn-cognito-userpool-usernameconfiguration-casesensitive"></a>
Specifies whether user name case sensitivity will be applied for all users in the user pool through Amazon Cognito APIs. For most use cases, set case sensitivity to `False` (case insensitive) as a best practice. When usernames and email addresses are case insensitive, users can sign in as the same user when they enter a different capitalization of their user name.  
Valid values include:    
true  
Enables case sensitivity for all username input. When this option is set to `true`, users must sign in using the exact capitalization of their given username, such as “UserName”. This is the default value.  
false  
Enables case insensitivity for all username input. For example, when this option is set to `false`, users can sign in using `username`, `USERNAME`, or `UserName`. This option also enables both `preferred_username` and `email` alias to be case insensitive, in addition to the `username` attribute.
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::UserPool UserPoolAddOns
<a name="aws-properties-cognito-userpool-userpooladdons"></a>

User pool add-ons. Contains settings for activation of threat protection. To log user security information but take no action, set to `AUDIT`. To configure automatic security responses to risky traffic to your user pool, set to `ENFORCED`.

For more information, see [Adding advanced security to a user pool](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pool-settings-advanced-security.html). To activate this setting, your user pool must be on the [ Plus tier](https://docs.aws.amazon.com/cognito/latest/developerguide/feature-plans-features-plus.html).

## Syntax
<a name="aws-properties-cognito-userpool-userpooladdons-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpool-userpooladdons-syntax.json"></a>

```
{
  "[AdvancedSecurityAdditionalFlows](#cfn-cognito-userpool-userpooladdons-advancedsecurityadditionalflows)" : AdvancedSecurityAdditionalFlows,
  "[AdvancedSecurityMode](#cfn-cognito-userpool-userpooladdons-advancedsecuritymode)" : String
}
```

### YAML
<a name="aws-properties-cognito-userpool-userpooladdons-syntax.yaml"></a>

```
  [AdvancedSecurityAdditionalFlows](#cfn-cognito-userpool-userpooladdons-advancedsecurityadditionalflows): 
    AdvancedSecurityAdditionalFlows
  [AdvancedSecurityMode](#cfn-cognito-userpool-userpooladdons-advancedsecuritymode): String
```

## Properties
<a name="aws-properties-cognito-userpool-userpooladdons-properties"></a>

`AdvancedSecurityAdditionalFlows`  <a name="cfn-cognito-userpool-userpooladdons-advancedsecurityadditionalflows"></a>
Threat protection configuration options for additional authentication types in your user pool, including custom authentication.   
*Required*: No  
*Type*: [AdvancedSecurityAdditionalFlows](aws-properties-cognito-userpool-advancedsecurityadditionalflows.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AdvancedSecurityMode`  <a name="cfn-cognito-userpool-userpooladdons-advancedsecuritymode"></a>
The operating mode of threat protection for standard authentication types in your user pool, including username-password and secure remote password (SRP) authentication.   
*Required*: No  
*Type*: String  
*Allowed values*: `OFF | AUDIT | ENFORCED`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::UserPool VerificationMessageTemplate
<a name="aws-properties-cognito-userpool-verificationmessagetemplate"></a>

The template for the verification message that your user pool delivers to users who set an email address or phone number attribute.

## Syntax
<a name="aws-properties-cognito-userpool-verificationmessagetemplate-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpool-verificationmessagetemplate-syntax.json"></a>

```
{
  "[DefaultEmailOption](#cfn-cognito-userpool-verificationmessagetemplate-defaultemailoption)" : String,
  "[EmailMessage](#cfn-cognito-userpool-verificationmessagetemplate-emailmessage)" : String,
  "[EmailMessageByLink](#cfn-cognito-userpool-verificationmessagetemplate-emailmessagebylink)" : String,
  "[EmailSubject](#cfn-cognito-userpool-verificationmessagetemplate-emailsubject)" : String,
  "[EmailSubjectByLink](#cfn-cognito-userpool-verificationmessagetemplate-emailsubjectbylink)" : String,
  "[SmsMessage](#cfn-cognito-userpool-verificationmessagetemplate-smsmessage)" : String
}
```

### YAML
<a name="aws-properties-cognito-userpool-verificationmessagetemplate-syntax.yaml"></a>

```
  [DefaultEmailOption](#cfn-cognito-userpool-verificationmessagetemplate-defaultemailoption): String
  [EmailMessage](#cfn-cognito-userpool-verificationmessagetemplate-emailmessage): String
  [EmailMessageByLink](#cfn-cognito-userpool-verificationmessagetemplate-emailmessagebylink): String
  [EmailSubject](#cfn-cognito-userpool-verificationmessagetemplate-emailsubject): String
  [EmailSubjectByLink](#cfn-cognito-userpool-verificationmessagetemplate-emailsubjectbylink): String
  [SmsMessage](#cfn-cognito-userpool-verificationmessagetemplate-smsmessage): String
```

## Properties
<a name="aws-properties-cognito-userpool-verificationmessagetemplate-properties"></a>

`DefaultEmailOption`  <a name="cfn-cognito-userpool-verificationmessagetemplate-defaultemailoption"></a>
The configuration of verification emails to contain a clickable link or a verification code.  
For link, your template body must contain link text in the format `{##Click here##}`. "Click here" in the example is a customizable string. For code, your template body must contain a code placeholder in the format `{####}`.  
*Required*: No  
*Type*: String  
*Allowed values*: `CONFIRM_WITH_LINK | CONFIRM_WITH_CODE`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EmailMessage`  <a name="cfn-cognito-userpool-verificationmessagetemplate-emailmessage"></a>
The template for email messages that Amazon Cognito sends to your users. You can set an `EmailMessage` template only if the value of [ EmailSendingAccount](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_EmailConfigurationType.html#CognitoUserPools-Type-EmailConfigurationType-EmailSendingAccount) is `DEVELOPER`. When your [EmailSendingAccount](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_EmailConfigurationType.html#CognitoUserPools-Type-EmailConfigurationType-EmailSendingAccount) is `DEVELOPER`, your user pool sends email messages with your own Amazon SES configuration.  
*Required*: No  
*Type*: String  
*Pattern*: `[\p{L}\p{M}\p{S}\p{N}\p{P}\s*]*\{####\}[\p{L}\p{M}\p{S}\p{N}\p{P}\s*]*`  
*Minimum*: `6`  
*Maximum*: `20000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EmailMessageByLink`  <a name="cfn-cognito-userpool-verificationmessagetemplate-emailmessagebylink"></a>
The email message template for sending a confirmation link to the user. You can set an `EmailMessageByLink` template only if the value of [ EmailSendingAccount](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_EmailConfigurationType.html#CognitoUserPools-Type-EmailConfigurationType-EmailSendingAccount) is `DEVELOPER`. When your [EmailSendingAccount](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_EmailConfigurationType.html#CognitoUserPools-Type-EmailConfigurationType-EmailSendingAccount) is `DEVELOPER`, your user pool sends email messages with your own Amazon SES configuration.  
*Required*: No  
*Type*: String  
*Pattern*: `[\p{L}\p{M}\p{S}\p{N}\p{P}\s*]*\{##[\p{L}\p{M}\p{S}\p{N}\p{P}\s*]*##\}[\p{L}\p{M}\p{S}\p{N}\p{P}\s*]*`  
*Minimum*: `6`  
*Maximum*: `20000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EmailSubject`  <a name="cfn-cognito-userpool-verificationmessagetemplate-emailsubject"></a>
The subject line for the email message template. You can set an `EmailSubject` template only if the value of [ EmailSendingAccount](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_EmailConfigurationType.html#CognitoUserPools-Type-EmailConfigurationType-EmailSendingAccount) is `DEVELOPER`. When your [EmailSendingAccount](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_EmailConfigurationType.html#CognitoUserPools-Type-EmailConfigurationType-EmailSendingAccount) is `DEVELOPER`, your user pool sends email messages with your own Amazon SES configuration.  
*Required*: No  
*Type*: String  
*Pattern*: `[\p{L}\p{M}\p{S}\p{N}\p{P}\s]+`  
*Minimum*: `1`  
*Maximum*: `140`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EmailSubjectByLink`  <a name="cfn-cognito-userpool-verificationmessagetemplate-emailsubjectbylink"></a>
The subject line for the email message template for sending a confirmation link to the user. You can set an `EmailSubjectByLink` template only if the value of [ EmailSendingAccount](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_EmailConfigurationType.html#CognitoUserPools-Type-EmailConfigurationType-EmailSendingAccount) is `DEVELOPER`. When your [EmailSendingAccount](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_EmailConfigurationType.html#CognitoUserPools-Type-EmailConfigurationType-EmailSendingAccount) is `DEVELOPER`, your user pool sends email messages with your own Amazon SES configuration.  
*Required*: No  
*Type*: String  
*Pattern*: `[\p{L}\p{M}\p{S}\p{N}\p{P}\s]+`  
*Minimum*: `1`  
*Maximum*: `140`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SmsMessage`  <a name="cfn-cognito-userpool-verificationmessagetemplate-smsmessage"></a>
The template for SMS messages that Amazon Cognito sends to your users.  
*Required*: No  
*Type*: String  
*Pattern*: `.*\{####\}.*`  
*Minimum*: `6`  
*Maximum*: `140`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::UserPoolClient
<a name="aws-resource-cognito-userpoolclient"></a>

The `AWS::Cognito::UserPoolClient` resource specifies an Amazon Cognito user pool client.

**Note**  
If you don't specify a value for a parameter, Amazon Cognito sets it to a default value.

## Syntax
<a name="aws-resource-cognito-userpoolclient-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-cognito-userpoolclient-syntax.json"></a>

```
{
  "Type" : "AWS::Cognito::UserPoolClient",
  "Properties" : {
      "[AccessTokenValidity](#cfn-cognito-userpoolclient-accesstokenvalidity)" : Integer,
      "[AllowedOAuthFlows](#cfn-cognito-userpoolclient-allowedoauthflows)" : [ String, ... ],
      "[AllowedOAuthFlowsUserPoolClient](#cfn-cognito-userpoolclient-allowedoauthflowsuserpoolclient)" : Boolean,
      "[AllowedOAuthScopes](#cfn-cognito-userpoolclient-allowedoauthscopes)" : [ String, ... ],
      "[AnalyticsConfiguration](#cfn-cognito-userpoolclient-analyticsconfiguration)" : AnalyticsConfiguration,
      "[AuthSessionValidity](#cfn-cognito-userpoolclient-authsessionvalidity)" : Integer,
      "[CallbackURLs](#cfn-cognito-userpoolclient-callbackurls)" : [ String, ... ],
      "[ClientName](#cfn-cognito-userpoolclient-clientname)" : String,
      "[DefaultRedirectURI](#cfn-cognito-userpoolclient-defaultredirecturi)" : String,
      "[EnablePropagateAdditionalUserContextData](#cfn-cognito-userpoolclient-enablepropagateadditionalusercontextdata)" : Boolean,
      "[EnableTokenRevocation](#cfn-cognito-userpoolclient-enabletokenrevocation)" : Boolean,
      "[ExplicitAuthFlows](#cfn-cognito-userpoolclient-explicitauthflows)" : [ String, ... ],
      "[GenerateSecret](#cfn-cognito-userpoolclient-generatesecret)" : Boolean,
      "[IdTokenValidity](#cfn-cognito-userpoolclient-idtokenvalidity)" : Integer,
      "[LogoutURLs](#cfn-cognito-userpoolclient-logouturls)" : [ String, ... ],
      "[PreventUserExistenceErrors](#cfn-cognito-userpoolclient-preventuserexistenceerrors)" : String,
      "[ReadAttributes](#cfn-cognito-userpoolclient-readattributes)" : [ String, ... ],
      "[RefreshTokenRotation](#cfn-cognito-userpoolclient-refreshtokenrotation)" : RefreshTokenRotation,
      "[RefreshTokenValidity](#cfn-cognito-userpoolclient-refreshtokenvalidity)" : Integer,
      "[SupportedIdentityProviders](#cfn-cognito-userpoolclient-supportedidentityproviders)" : [ String, ... ],
      "[TokenValidityUnits](#cfn-cognito-userpoolclient-tokenvalidityunits)" : TokenValidityUnits,
      "[UserPoolId](#cfn-cognito-userpoolclient-userpoolid)" : String,
      "[WriteAttributes](#cfn-cognito-userpoolclient-writeattributes)" : [ String, ... ]
    }
}
```

### YAML
<a name="aws-resource-cognito-userpoolclient-syntax.yaml"></a>

```
Type: AWS::Cognito::UserPoolClient
Properties:
  [AccessTokenValidity](#cfn-cognito-userpoolclient-accesstokenvalidity): Integer
  [AllowedOAuthFlows](#cfn-cognito-userpoolclient-allowedoauthflows): 
    - String
  [AllowedOAuthFlowsUserPoolClient](#cfn-cognito-userpoolclient-allowedoauthflowsuserpoolclient): Boolean
  [AllowedOAuthScopes](#cfn-cognito-userpoolclient-allowedoauthscopes): 
    - String
  [AnalyticsConfiguration](#cfn-cognito-userpoolclient-analyticsconfiguration): 
    AnalyticsConfiguration
  [AuthSessionValidity](#cfn-cognito-userpoolclient-authsessionvalidity): Integer
  [CallbackURLs](#cfn-cognito-userpoolclient-callbackurls): 
    - String
  [ClientName](#cfn-cognito-userpoolclient-clientname): String
  [DefaultRedirectURI](#cfn-cognito-userpoolclient-defaultredirecturi): String
  [EnablePropagateAdditionalUserContextData](#cfn-cognito-userpoolclient-enablepropagateadditionalusercontextdata): Boolean
  [EnableTokenRevocation](#cfn-cognito-userpoolclient-enabletokenrevocation): Boolean
  [ExplicitAuthFlows](#cfn-cognito-userpoolclient-explicitauthflows): 
    - String
  [GenerateSecret](#cfn-cognito-userpoolclient-generatesecret): Boolean
  [IdTokenValidity](#cfn-cognito-userpoolclient-idtokenvalidity): Integer
  [LogoutURLs](#cfn-cognito-userpoolclient-logouturls): 
    - String
  [PreventUserExistenceErrors](#cfn-cognito-userpoolclient-preventuserexistenceerrors): String
  [ReadAttributes](#cfn-cognito-userpoolclient-readattributes): 
    - String
  [RefreshTokenRotation](#cfn-cognito-userpoolclient-refreshtokenrotation): 
    RefreshTokenRotation
  [RefreshTokenValidity](#cfn-cognito-userpoolclient-refreshtokenvalidity): Integer
  [SupportedIdentityProviders](#cfn-cognito-userpoolclient-supportedidentityproviders): 
    - String
  [TokenValidityUnits](#cfn-cognito-userpoolclient-tokenvalidityunits): 
    TokenValidityUnits
  [UserPoolId](#cfn-cognito-userpoolclient-userpoolid): String
  [WriteAttributes](#cfn-cognito-userpoolclient-writeattributes): 
    - String
```

## Properties
<a name="aws-resource-cognito-userpoolclient-properties"></a>

`AccessTokenValidity`  <a name="cfn-cognito-userpoolclient-accesstokenvalidity"></a>
The access token time limit. After this limit expires, your user can't use their access token. To specify the time unit for `AccessTokenValidity` as `seconds`, `minutes`, `hours`, or `days`, set a `TokenValidityUnits` value in your API request.  
For example, when you set `AccessTokenValidity` to `10` and `TokenValidityUnits` to `hours`, your user can authorize access with their access token for 10 hours.  
The default time unit for `AccessTokenValidity` in an API request is hours. *Valid range* is displayed below in seconds.  
If you don't specify otherwise in the configuration of your app client, your access tokens are valid for one hour.  
*Required*: No  
*Type*: Integer  
*Minimum*: `1`  
*Maximum*: `86400`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AllowedOAuthFlows`  <a name="cfn-cognito-userpoolclient-allowedoauthflows"></a>
The OAuth grant types that you want your app client to generate for clients in managed login authentication. To create an app client that generates client credentials grants, you must add `client_credentials` as the only allowed OAuth flow.    
code  
Use a code grant flow, which provides an authorization code as the response. This code can be exchanged for access tokens with the `/oauth2/token` endpoint.  
implicit  
Issue the access token, and the ID token when scopes like `openid` and `profile` are requested, directly to your user.  
client\$1credentials  
Issue the access token from the `/oauth2/token` endpoint directly to a non-person user, authorized by a combination of the client ID and client secret.
*Required*: No  
*Type*: Array of String  
*Minimum*: `0`  
*Maximum*: `3`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AllowedOAuthFlowsUserPoolClient`  <a name="cfn-cognito-userpoolclient-allowedoauthflowsuserpoolclient"></a>
Set to `true` to use OAuth 2.0 authorization server features in your app client.  
This parameter must have a value of `true` before you can configure the following features in your app client.  
+ `CallBackURLs`: Callback URLs.
+ `LogoutURLs`: Sign-out redirect URLs.
+ `AllowedOAuthScopes`: OAuth 2.0 scopes.
+ `AllowedOAuthFlows`: Support for authorization code, implicit, and client credentials OAuth 2.0 grants.
To use authorization server features, configure one of these features in the Amazon Cognito console or set `AllowedOAuthFlowsUserPoolClient` to `true` in a `CreateUserPoolClient` or `UpdateUserPoolClient` API request. If you don't set a value for `AllowedOAuthFlowsUserPoolClient` in a request with the AWS CLI or SDKs, it defaults to `false`. When `false`, only SDK-based API sign-in is permitted.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AllowedOAuthScopes`  <a name="cfn-cognito-userpoolclient-allowedoauthscopes"></a>
The OAuth, OpenID Connect (OIDC), and custom scopes that you want to permit your app client to authorize access with. Scopes govern access control to user pool self-service API operations, user data from the `userInfo` endpoint, and third-party APIs. Scope values include `phone`, `email`, `openid`, and `profile`. The `aws.cognito.signin.user.admin` scope authorizes user self-service operations. Custom scopes with resource servers authorize access to external APIs.  
*Required*: No  
*Type*: Array of String  
*Maximum*: `50`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AnalyticsConfiguration`  <a name="cfn-cognito-userpoolclient-analyticsconfiguration"></a>
The user pool analytics configuration for collecting metrics and sending them to your Amazon Pinpoint campaign.  
In AWS Regions where Amazon Pinpoint isn't available, user pools might not have access to analytics or might be configurable with campaigns in the US East (N. Virginia) Region. For more information, see [Using Amazon Pinpoint analytics](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-pinpoint-integration.html).  
*Required*: No  
*Type*: [AnalyticsConfiguration](aws-properties-cognito-userpoolclient-analyticsconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AuthSessionValidity`  <a name="cfn-cognito-userpoolclient-authsessionvalidity"></a>
Amazon Cognito creates a session token for each API request in an authentication flow. `AuthSessionValidity` is the duration, in minutes, of that session token. Your user pool native user must respond to each authentication challenge before the session expires.  
*Required*: No  
*Type*: Integer  
*Minimum*: `3`  
*Maximum*: `15`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CallbackURLs`  <a name="cfn-cognito-userpoolclient-callbackurls"></a>
A list of allowed redirect, or callback, URLs for managed login authentication. These URLs are the paths where you want to send your users' browsers after they complete authentication with managed login or a third-party IdP. Typically, callback URLs are the home of an application that uses OAuth or OIDC libraries to process authentication outcomes.  
A redirect URI must meet the following requirements:  
+ Be an absolute URI.
+ Be registered with the authorization server. Amazon Cognito doesn't accept authorization requests with `redirect_uri` values that aren't in the list of `CallbackURLs` that you provide in this parameter.
+ Not include a fragment component.
See [OAuth 2.0 - Redirection Endpoint](https://tools.ietf.org/html/rfc6749#section-3.1.2).  
Amazon Cognito requires HTTPS over HTTP except for callback URLs to `http://localhost`, `http://127.0.0.1` and `http://[::1]`. These callback URLs are for testing purposes only. You can specify custom TCP ports for your callback URLs.  
App callback URLs such as `myapp://example` are also supported.  
*Required*: No  
*Type*: Array of String  
*Minimum*: `0`  
*Maximum*: `100`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ClientName`  <a name="cfn-cognito-userpoolclient-clientname"></a>
A friendly name for the app client that you want to create.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DefaultRedirectURI`  <a name="cfn-cognito-userpoolclient-defaultredirecturi"></a>
The default redirect URI. In app clients with one assigned IdP, replaces `redirect_uri` in authentication requests. Must be in the `CallbackURLs` list.  
*Required*: No  
*Type*: String  
*Pattern*: `[\p{L}\p{M}\p{S}\p{N}\p{P}]+`  
*Minimum*: `1`  
*Maximum*: `1024`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EnablePropagateAdditionalUserContextData`  <a name="cfn-cognito-userpoolclient-enablepropagateadditionalusercontextdata"></a>
When `true`, your application can include additional `UserContextData` in authentication requests. This data includes the IP address, and contributes to analysis by threat protection features. For more information about propagation of user context data, see [Adding session data to API requests](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pool-settings-adaptive-authentication.html#user-pool-settings-adaptive-authentication-device-fingerprint). If you don’t include this parameter, you can't send the source IP address to Amazon Cognito threat protection features. You can only activate `EnablePropagateAdditionalUserContextData` in an app client that has a client secret.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EnableTokenRevocation`  <a name="cfn-cognito-userpoolclient-enabletokenrevocation"></a>
Activates or deactivates token revocation.  
If you don't include this parameter, token revocation is automatically activated for the new user pool client.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ExplicitAuthFlows`  <a name="cfn-cognito-userpoolclient-explicitauthflows"></a>
The [authentication flows](https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-authentication-flow-methods.html) that you want your user pool client to support. For each app client in your user pool, you can sign in your users with any combination of one or more flows, including with a user name and Secure Remote Password (SRP), a user name and password, or a custom authentication process that you define with Lambda functions.  
If you don't specify a value for `ExplicitAuthFlows`, your app client supports `ALLOW_REFRESH_TOKEN_AUTH`, `ALLOW_USER_SRP_AUTH`, and `ALLOW_CUSTOM_AUTH`. 
The values for authentication flow options include the following.  
+ `ALLOW_USER_AUTH`: Enable selection-based sign-in with `USER_AUTH`. This setting covers username-password, secure remote password (SRP), passwordless, and passkey authentication. This authentiation flow can do username-password and SRP authentication without other `ExplicitAuthFlows` permitting them. For example users can complete an SRP challenge through `USER_AUTH` without the flow `USER_SRP_AUTH` being active for the app client. This flow doesn't include `CUSTOM_AUTH`. 

  To activate this setting, your user pool must be in the [ Essentials tier](https://docs.aws.amazon.com/cognito/latest/developerguide/feature-plans-features-essentials.html) or higher.
+ `ALLOW_ADMIN_USER_PASSWORD_AUTH`: Enable admin based user password authentication flow `ADMIN_USER_PASSWORD_AUTH`. This setting replaces the `ADMIN_NO_SRP_AUTH` setting. With this authentication flow, your app passes a user name and password to Amazon Cognito in the request, instead of using the Secure Remote Password (SRP) protocol to securely transmit the password.
+ `ALLOW_CUSTOM_AUTH`: Enable Lambda trigger based authentication.
+ `ALLOW_USER_PASSWORD_AUTH`: Enable user password-based authentication. In this flow, Amazon Cognito receives the password in the request instead of using the SRP protocol to verify passwords.
+ `ALLOW_USER_SRP_AUTH`: Enable SRP-based authentication.
+ `ALLOW_REFRESH_TOKEN_AUTH`: Enable authflow to refresh tokens.
In some environments, you will see the values `ADMIN_NO_SRP_AUTH`, `CUSTOM_AUTH_FLOW_ONLY`, or `USER_PASSWORD_AUTH`. You can't assign these legacy `ExplicitAuthFlows` values to user pool clients at the same time as values that begin with `ALLOW_`, like `ALLOW_USER_SRP_AUTH`.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`GenerateSecret`  <a name="cfn-cognito-userpoolclient-generatesecret"></a>
When `true`, generates a client secret for the app client. Client secrets are used with server-side and machine-to-machine applications. Client secrets are automatically generated; you can't specify a secret value. For more information, see [App client types](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-client-apps.html#user-pool-settings-client-app-client-types).  
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`IdTokenValidity`  <a name="cfn-cognito-userpoolclient-idtokenvalidity"></a>
The ID token time limit. After this limit expires, your user can't use their ID token. To specify the time unit for `IdTokenValidity` as `seconds`, `minutes`, `hours`, or `days`, set a `TokenValidityUnits` value in your API request.  
For example, when you set `IdTokenValidity` as `10` and `TokenValidityUnits` as `hours`, your user can authenticate their session with their ID token for 10 hours.  
The default time unit for `IdTokenValidity` in an API request is hours. *Valid range* is displayed below in seconds.  
If you don't specify otherwise in the configuration of your app client, your ID tokens are valid for one hour.  
*Required*: No  
*Type*: Integer  
*Minimum*: `1`  
*Maximum*: `86400`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LogoutURLs`  <a name="cfn-cognito-userpoolclient-logouturls"></a>
A list of allowed logout URLs for managed login authentication. When you pass `logout_uri` and `client_id` parameters to `/logout`, Amazon Cognito signs out your user and redirects them to the logout URL. This parameter describes the URLs that you want to be the permitted targets of `logout_uri`. A typical use of these URLs is when a user selects "Sign out" and you redirect them to your public homepage. For more information, see [Logout endpoint](https://docs.aws.amazon.com/cognito/latest/developerguide/logout-endpoint.html).  
*Required*: No  
*Type*: Array of String  
*Minimum*: `0`  
*Maximum*: `100`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PreventUserExistenceErrors`  <a name="cfn-cognito-userpoolclient-preventuserexistenceerrors"></a>
Errors and responses that you want Amazon Cognito APIs to return during authentication, account confirmation, and password recovery when the user doesn't exist in the user pool. When set to `ENABLED` and the user doesn't exist, authentication returns an error indicating either the username or password was incorrect. Account confirmation and password recovery return a response indicating a code was sent to a simulated destination. When set to `LEGACY`, those APIs return a `UserNotFoundException` exception if the user doesn't exist in the user pool.  
Valid values include:  
+ `ENABLED` - This prevents user existence-related errors.
+ `LEGACY` - This represents the early behavior of Amazon Cognito where user existence related errors aren't prevented.
Defaults to `LEGACY` when you don't provide a value.  
*Required*: No  
*Type*: String  
*Allowed values*: `LEGACY | ENABLED`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ReadAttributes`  <a name="cfn-cognito-userpoolclient-readattributes"></a>
The list of user attributes that you want your app client to have read access to. After your user authenticates in your app, their access token authorizes them to read their own attribute value for any attribute in this list. An example of this kind of activity is when your user selects a link to view their profile information.  
When you don't specify the `ReadAttributes` for your app client, your app can read the values of `email_verified`, `phone_number_verified`, and the Standard attributes of your user pool. When your user pool app client has read access to these default attributes, `ReadAttributes` doesn't return any information. Amazon Cognito only populates `ReadAttributes` in the API response if you have specified your own custom set of read attributes.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RefreshTokenRotation`  <a name="cfn-cognito-userpoolclient-refreshtokenrotation"></a>
The configuration of your app client for refresh token rotation. When enabled, your app client issues new ID, access, and refresh tokens when users renew their sessions with refresh tokens. When disabled, token refresh issues only ID and access tokens.  
*Required*: No  
*Type*: [RefreshTokenRotation](aws-properties-cognito-userpoolclient-refreshtokenrotation.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RefreshTokenValidity`  <a name="cfn-cognito-userpoolclient-refreshtokenvalidity"></a>
The refresh token time limit. After this limit expires, your user can't use their refresh token. To specify the time unit for `RefreshTokenValidity` as `seconds`, `minutes`, `hours`, or `days`, set a `TokenValidityUnits` value in your API request.  
For example, when you set `RefreshTokenValidity` as `10` and `TokenValidityUnits` as `days`, your user can refresh their session and retrieve new access and ID tokens for 10 days.  
The default time unit for `RefreshTokenValidity` in an API request is days. You can't set `RefreshTokenValidity` to 0. If you do, Amazon Cognito overrides the value with the default value of 30 days. *Valid range* is displayed below in seconds.  
If you don't specify otherwise in the configuration of your app client, your refresh tokens are valid for 30 days.  
*Required*: No  
*Type*: Integer  
*Minimum*: `1`  
*Maximum*: `315360000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SupportedIdentityProviders`  <a name="cfn-cognito-userpoolclient-supportedidentityproviders"></a>
A list of provider names for the identity providers (IdPs) that are supported on this client. The following are supported: `COGNITO`, `Facebook`, `Google`, `SignInWithApple`, and `LoginWithAmazon`. You can also specify the names that you configured for the SAML and OIDC IdPs in your user pool, for example `MySAMLIdP` or `MyOIDCIdP`.  
This parameter sets the IdPs that [managed login](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-managed-login.html) will display on the login page for your app client. The removal of `COGNITO` from this list doesn't prevent authentication operations for local users with the user pools API in an AWS SDK. The only way to prevent SDK-based authentication is to block access with a [AWS WAF rule](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-waf.html).   
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TokenValidityUnits`  <a name="cfn-cognito-userpoolclient-tokenvalidityunits"></a>
The units that validity times are represented in. The default unit for refresh tokens is days, and the default for ID and access tokens are hours.  
*Required*: No  
*Type*: [TokenValidityUnits](aws-properties-cognito-userpoolclient-tokenvalidityunits.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`UserPoolId`  <a name="cfn-cognito-userpoolclient-userpoolid"></a>
The ID of the user pool where you want to create an app client.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[\w-]+_[0-9a-zA-Z]+`  
*Minimum*: `1`  
*Maximum*: `55`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`WriteAttributes`  <a name="cfn-cognito-userpoolclient-writeattributes"></a>
The list of user attributes that you want your app client to have write access to. After your user authenticates in your app, their access token authorizes them to set or modify their own attribute value for any attribute in this list.  
When you don't specify the `WriteAttributes` for your app client, your app can write the values of the Standard attributes of your user pool. When your user pool has write access to these default attributes, `WriteAttributes` doesn't return any information. Amazon Cognito only populates `WriteAttributes` in the API response if you have specified your own custom set of write attributes.  
If your app client allows users to sign in through an IdP, this array must include all attributes that you have mapped to IdP attributes. Amazon Cognito updates mapped attributes when users sign in to your application through an IdP. If your app client does not have write access to a mapped attribute, Amazon Cognito throws an error when it tries to update the attribute. For more information, see [Specifying IdP Attribute Mappings for Your user pool](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-specifying-attribute-mapping.html).  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-cognito-userpoolclient-return-values"></a>

### Ref
<a name="aws-resource-cognito-userpoolclient-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the Amazon Cognito user pool client ID, such as `1h57kf5cpq17m0eml12EXAMPLE`.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-cognito-userpoolclient-return-values-fn--getatt"></a>

#### 
<a name="aws-resource-cognito-userpoolclient-return-values-fn--getatt-fn--getatt"></a>

`ClientId`  <a name="ClientId-fn::getatt"></a>
The ID of the app client, for example `1example23456789`.

## Examples
<a name="aws-resource-cognito-userpoolclient--examples"></a>



### Creating a new app client for a user pool
<a name="aws-resource-cognito-userpoolclient--examples--Creating_a_new_app_client_for_a_user_pool"></a>

The following example creates an app client with analytics, custom scopes, OAuth services, and third-party identity providers. An app client with this configuration is used with managed login.

#### JSON
<a name="aws-resource-cognito-userpoolclient--examples--Creating_a_new_app_client_for_a_user_pool--json"></a>

```
{
    "UserPoolClient": {
        "Properties": {
            "AccessTokenValidity": 30,
            "AllowedOAuthFlows": [
                "code",
                "implicit"
            ],
            "AllowedOAuthFlowsUserPoolClient": true,
            "AllowedOAuthScopes": [
                "openid",
                "profile",
                "email",
                "myapi.example.com/international.read",
                "myapi.example.com/domestic.read"
            ],
            "AnalyticsConfiguration": {
                "ApplicationArn": "arn:aws:mobiletargeting:us-west-2:123456789012:apps/d70b2ba36a8c4dc5a04a0451aEXAMPLE",
                "UserDataShared": true
            },
            "AuthSessionValidity": 9,
            "CallbackURLs": [
                "https://www.example.com",
                "myapp://example"
            ],
            "ClientName": "my-test-app-client",
            "DefaultRedirectURI": "https://www.example.com",
            "EnablePropagateAdditionalUserContextData": true,
            "EnableTokenRevocation": true,
            "ExplicitAuthFlows": [
                "ALLOW_USER_AUTH",
                "ALLOW_ADMIN_USER_PASSWORD_AUTH",
                "ALLOW_USER_PASSWORD_AUTH",
                "ALLOW_REFRESH_TOKEN_AUTH"
            ],
            "GenerateSecret": true,
            "IdTokenValidity": 30,
            "LogoutURLs": [
                "https://www.example.com/logout",
                "http://localhost:8080"
            ],
            "PreventUserExistenceErrors": "ENABLED",
            "ReadAttributes": [
                "email",
                "phone_number",
                "oidc:profile",
                "custom:department"
            ],
            "RefreshTokenValidity": 10,
            "SupportedIdentityProviders": [
                "Google",
                "LoginWithAmazon",
                "SignInWithApple",
                "Facebook",
                "MYSSO"
            ],
            "TokenValidityUnits": {
                "AccessToken": "minutes",
                "IdToken": "minutes",
                "RefreshToken": "days"
            },
            "UserPoolId": "us-west-2_EXAMPLE",
            "WriteAttributes": [
                "email",
                "oidc:profile",
                "custom:department"
            ]
        },
        "Type": "AWS::Cognito::UserPoolClient"
    }
}
```

#### YAML
<a name="aws-resource-cognito-userpoolclient--examples--Creating_a_new_app_client_for_a_user_pool--yaml"></a>

```
UserPoolClient:
    Type: AWS::Cognito::UserPoolClient
    Properties:
      AccessTokenValidity: 30
      AllowedOAuthFlows:
        - code
        - implicit
      AllowedOAuthFlowsUserPoolClient: true
      AllowedOAuthScopes:
        - openid
        - profile
        - email
        - myapi.example.com/international.read
        - myapi.example.com/domestic.read
      AnalyticsConfiguration:
        ApplicationArn: arn:aws:mobiletargeting:us-west-2:123456789012:apps/d70b2ba36a8c4dc5a04a0451aEXAMPLE
        UserDataShared: true
      AuthSessionValidity: 9
      CallbackURLs:
        - https://www.example.com
        - myapp://example
      ClientName: my-test-app-client
      DefaultRedirectURI: https://www.example.com
      EnablePropagateAdditionalUserContextData: true
      EnableTokenRevocation: true
      ExplicitAuthFlows:
        - ALLOW_USER_AUTH
        - ALLOW_ADMIN_USER_PASSWORD_AUTH
        - ALLOW_USER_PASSWORD_AUTH
        - ALLOW_REFRESH_TOKEN_AUTH
      GenerateSecret: true
      IdTokenValidity: 30
      LogoutURLs:
        - https://www.example.com/logout
        - http://localhost:8080
      PreventUserExistenceErrors: ENABLED
      ReadAttributes:
        - email
        - phone_number
        - oidc:profile
        - custom:department
      RefreshTokenValidity: 10
      SupportedIdentityProviders:
        - Google
        - LoginWithAmazon
        - SignInWithApple
        - Facebook
        - MYSSO
      TokenValidityUnits:
        AccessToken: minutes
        IdToken: minutes
        RefreshToken: days
      UserPoolId: us-west-2_EXAMPLE
      WriteAttributes:
        - email
        - oidc:profile
        - custom:111
```

# AWS::Cognito::UserPoolClient AnalyticsConfiguration
<a name="aws-properties-cognito-userpoolclient-analyticsconfiguration"></a>

The settings for Amazon Pinpoint analytics configuration. With an analytics configuration, your application can collect user-activity metrics for user notifications with a Amazon Pinpoint campaign.

Amazon Pinpoint isn't available in all AWS Regions. For a list of available Regions, see [Amazon Cognito and Amazon Pinpoint Region availability](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-pinpoint-integration.html#cognito-user-pools-find-region-mappings).

## Syntax
<a name="aws-properties-cognito-userpoolclient-analyticsconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpoolclient-analyticsconfiguration-syntax.json"></a>

```
{
  "[ApplicationArn](#cfn-cognito-userpoolclient-analyticsconfiguration-applicationarn)" : String,
  "[ApplicationId](#cfn-cognito-userpoolclient-analyticsconfiguration-applicationid)" : String,
  "[ExternalId](#cfn-cognito-userpoolclient-analyticsconfiguration-externalid)" : String,
  "[RoleArn](#cfn-cognito-userpoolclient-analyticsconfiguration-rolearn)" : String,
  "[UserDataShared](#cfn-cognito-userpoolclient-analyticsconfiguration-userdatashared)" : Boolean
}
```

### YAML
<a name="aws-properties-cognito-userpoolclient-analyticsconfiguration-syntax.yaml"></a>

```
  [ApplicationArn](#cfn-cognito-userpoolclient-analyticsconfiguration-applicationarn): String
  [ApplicationId](#cfn-cognito-userpoolclient-analyticsconfiguration-applicationid): String
  [ExternalId](#cfn-cognito-userpoolclient-analyticsconfiguration-externalid): String
  [RoleArn](#cfn-cognito-userpoolclient-analyticsconfiguration-rolearn): String
  [UserDataShared](#cfn-cognito-userpoolclient-analyticsconfiguration-userdatashared): Boolean
```

## Properties
<a name="aws-properties-cognito-userpoolclient-analyticsconfiguration-properties"></a>

`ApplicationArn`  <a name="cfn-cognito-userpoolclient-analyticsconfiguration-applicationarn"></a>
The Amazon Resource Name (ARN) of an Amazon Pinpoint project that you want to connect to your user pool app client. Amazon Cognito publishes events to the Amazon Pinpoint project that `ApplicationArn` declares. You can also configure your application to pass an endpoint ID in the `AnalyticsMetadata` parameter of sign-in operations. The endpoint ID is information about the destination for push notifications  
*Required*: No  
*Type*: String  
*Pattern*: `arn:[\w+=/,.@-]+:[\w+=/,.@-]+:([\w+=/,.@-]*)?:[0-9]+:[\w+=/,.@-]+(:[\w+=/,.@-]+)?(:[\w+=/,.@-]+)?`  
*Minimum*: `20`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ApplicationId`  <a name="cfn-cognito-userpoolclient-analyticsconfiguration-applicationid"></a>
Your Amazon Pinpoint project ID.  
*Required*: No  
*Type*: String  
*Pattern*: `^[0-9a-fA-F]+$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ExternalId`  <a name="cfn-cognito-userpoolclient-analyticsconfiguration-externalid"></a>
The [external ID](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html) of the role that Amazon Cognito assumes to send analytics data to Amazon Pinpoint.  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `131072`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleArn`  <a name="cfn-cognito-userpoolclient-analyticsconfiguration-rolearn"></a>
The ARN of an AWS Identity and Access Management role that has the permissions required for Amazon Cognito to publish events to Amazon Pinpoint analytics.  
*Required*: No  
*Type*: String  
*Pattern*: `arn:[\w+=/,.@-]+:[\w+=/,.@-]+:([\w+=/,.@-]*)?:[0-9]+:[\w+=/,.@-]+(:[\w+=/,.@-]+)?(:[\w+=/,.@-]+)?`  
*Minimum*: `20`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`UserDataShared`  <a name="cfn-cognito-userpoolclient-analyticsconfiguration-userdatashared"></a>
If `UserDataShared` is `true`, Amazon Cognito includes user data in the events that it publishes to Amazon Pinpoint analytics.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::UserPoolClient RefreshTokenRotation
<a name="aws-properties-cognito-userpoolclient-refreshtokenrotation"></a>

The configuration of your app client for refresh token rotation. When enabled, your app client issues new ID, access, and refresh tokens when users renew their sessions with refresh tokens. When disabled, token refresh issues only ID and access tokens.

## Syntax
<a name="aws-properties-cognito-userpoolclient-refreshtokenrotation-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpoolclient-refreshtokenrotation-syntax.json"></a>

```
{
  "[Feature](#cfn-cognito-userpoolclient-refreshtokenrotation-feature)" : String,
  "[RetryGracePeriodSeconds](#cfn-cognito-userpoolclient-refreshtokenrotation-retrygraceperiodseconds)" : Integer
}
```

### YAML
<a name="aws-properties-cognito-userpoolclient-refreshtokenrotation-syntax.yaml"></a>

```
  [Feature](#cfn-cognito-userpoolclient-refreshtokenrotation-feature): String
  [RetryGracePeriodSeconds](#cfn-cognito-userpoolclient-refreshtokenrotation-retrygraceperiodseconds): Integer
```

## Properties
<a name="aws-properties-cognito-userpoolclient-refreshtokenrotation-properties"></a>

`Feature`  <a name="cfn-cognito-userpoolclient-refreshtokenrotation-feature"></a>
The state of refresh token rotation for the current app client.  
*Required*: No  
*Type*: String  
*Allowed values*: `ENABLED | DISABLED`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RetryGracePeriodSeconds`  <a name="cfn-cognito-userpoolclient-refreshtokenrotation-retrygraceperiodseconds"></a>
When you request a token refresh with `GetTokensFromRefreshToken`, the original refresh token that you're rotating out can remain valid for a period of time of up to 60 seconds. This allows for client-side retries. When `RetryGracePeriodSeconds` is `0`, the grace period is disabled and a successful request immediately invalidates the submitted refresh token.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Maximum*: `60`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::UserPoolClient TokenValidityUnits
<a name="aws-properties-cognito-userpoolclient-tokenvalidityunits"></a>

The units that validity times are represented in. The default unit for refresh tokens is days, and the default for ID and access tokens are hours.

## Syntax
<a name="aws-properties-cognito-userpoolclient-tokenvalidityunits-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpoolclient-tokenvalidityunits-syntax.json"></a>

```
{
  "[AccessToken](#cfn-cognito-userpoolclient-tokenvalidityunits-accesstoken)" : String,
  "[IdToken](#cfn-cognito-userpoolclient-tokenvalidityunits-idtoken)" : String,
  "[RefreshToken](#cfn-cognito-userpoolclient-tokenvalidityunits-refreshtoken)" : String
}
```

### YAML
<a name="aws-properties-cognito-userpoolclient-tokenvalidityunits-syntax.yaml"></a>

```
  [AccessToken](#cfn-cognito-userpoolclient-tokenvalidityunits-accesstoken): String
  [IdToken](#cfn-cognito-userpoolclient-tokenvalidityunits-idtoken): String
  [RefreshToken](#cfn-cognito-userpoolclient-tokenvalidityunits-refreshtoken): String
```

## Properties
<a name="aws-properties-cognito-userpoolclient-tokenvalidityunits-properties"></a>

`AccessToken`  <a name="cfn-cognito-userpoolclient-tokenvalidityunits-accesstoken"></a>
 A time unit for the value that you set in the `AccessTokenValidity` parameter. The default `AccessTokenValidity` time unit is `hours`. `AccessTokenValidity` duration can range from five minutes to one day.  
*Required*: No  
*Type*: String  
*Allowed values*: `seconds | minutes | hours | days`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`IdToken`  <a name="cfn-cognito-userpoolclient-tokenvalidityunits-idtoken"></a>
A time unit for the value that you set in the `IdTokenValidity` parameter. The default `IdTokenValidity` time unit is `hours`. `IdTokenValidity` duration can range from five minutes to one day.  
*Required*: No  
*Type*: String  
*Allowed values*: `seconds | minutes | hours | days`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RefreshToken`  <a name="cfn-cognito-userpoolclient-tokenvalidityunits-refreshtoken"></a>
A time unit for the value that you set in the `RefreshTokenValidity` parameter. The default `RefreshTokenValidity` time unit is `days`. `RefreshTokenValidity` duration can range from 60 minutes to 10 years.  
*Required*: No  
*Type*: String  
*Allowed values*: `seconds | minutes | hours | days`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::UserPoolDomain
<a name="aws-resource-cognito-userpooldomain"></a>

The AWS::Cognito::UserPoolDomain resource creates a new domain for a user pool.

## Syntax
<a name="aws-resource-cognito-userpooldomain-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-cognito-userpooldomain-syntax.json"></a>

```
{
  "Type" : "AWS::Cognito::UserPoolDomain",
  "Properties" : {
      "[CustomDomainConfig](#cfn-cognito-userpooldomain-customdomainconfig)" : CustomDomainConfigType,
      "[Domain](#cfn-cognito-userpooldomain-domain)" : String,
      "[ManagedLoginVersion](#cfn-cognito-userpooldomain-managedloginversion)" : Integer,
      "[UserPoolId](#cfn-cognito-userpooldomain-userpoolid)" : String
    }
}
```

### YAML
<a name="aws-resource-cognito-userpooldomain-syntax.yaml"></a>

```
Type: AWS::Cognito::UserPoolDomain
Properties:
  [CustomDomainConfig](#cfn-cognito-userpooldomain-customdomainconfig): 
    CustomDomainConfigType
  [Domain](#cfn-cognito-userpooldomain-domain): String
  [ManagedLoginVersion](#cfn-cognito-userpooldomain-managedloginversion): Integer
  [UserPoolId](#cfn-cognito-userpooldomain-userpoolid): String
```

## Properties
<a name="aws-resource-cognito-userpooldomain-properties"></a>

`CustomDomainConfig`  <a name="cfn-cognito-userpooldomain-customdomainconfig"></a>
The configuration for a custom domain that hosts the sign-up and sign-in pages for your application. Use this object to specify an SSL certificate that is managed by ACM.  
When you create a custom domain, the passkey RP ID defaults to the custom domain. If you had a prefix domain active, this will cause passkey integration for your prefix domain to stop working due to a mismatch in RP ID. To keep the prefix domain passkey integration working, you can explicitly set RP ID to the prefix domain.  
*Required*: No  
*Type*: [CustomDomainConfigType](aws-properties-cognito-userpooldomain-customdomainconfigtype.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Domain`  <a name="cfn-cognito-userpooldomain-domain"></a>
The name of the domain that you want to update. For custom domains, this is the fully-qualified domain name, for example `auth.example.com`. For prefix domains, this is the prefix alone, such as `myprefix`.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^[a-z0-9](?:[a-z0-9\-]{0,61}[a-z0-9])?$`  
*Minimum*: `1`  
*Maximum*: `63`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ManagedLoginVersion`  <a name="cfn-cognito-userpooldomain-managedloginversion"></a>
A version number that indicates the state of managed login for your domain. Version `1` is hosted UI (classic). Version `2` is the newer managed login with the branding editor. For more information, see [Managed login](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-managed-login.html).  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`UserPoolId`  <a name="cfn-cognito-userpooldomain-userpoolid"></a>
The ID of the user pool that is associated with the domain you're updating.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[\w-]+_[0-9a-zA-Z]+`  
*Minimum*: `1`  
*Maximum*: `55`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-cognito-userpooldomain-return-values"></a>

### Ref
<a name="aws-resource-cognito-userpooldomain-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns physicalResourceId, which is “Domain". For example:

 `{ "Ref": "your-test-domain" }` 

For the Amazon Cognito user pool domain `your-test-domain`, Ref returns the name of the user pool domain.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-cognito-userpooldomain-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-cognito-userpooldomain-return-values-fn--getatt-fn--getatt"></a>

`CloudFrontDistribution`  <a name="CloudFrontDistribution-fn::getatt"></a>
The Amazon CloudFront endpoint that you use as the target of the alias that you set up with your Domain Name Service (DNS) provider.

## Examples
<a name="aws-resource-cognito-userpooldomain--examples"></a>



**Topics**
+ [Creating a new custom domain for a user pool](#aws-resource-cognito-userpooldomain--examples--Creating_a_new_custom_domain_for_a_user_pool)
+ [Creating a new default domain for a user pool](#aws-resource-cognito-userpooldomain--examples--Creating_a_new_default_domain_for_a_user_pool)

### Creating a new custom domain for a user pool
<a name="aws-resource-cognito-userpooldomain--examples--Creating_a_new_custom_domain_for_a_user_pool"></a>

The following example creates a custom domain, "my-test-user-pool-domain", in the referenced user pool.

#### JSON
<a name="aws-resource-cognito-userpooldomain--examples--Creating_a_new_custom_domain_for_a_user_pool--json"></a>

```
{
   "UserPoolDomain":{
      "Type":"AWS::Cognito::UserPoolDomain",
      "Properties":{
         "UserPoolId":{
            "Ref":"UserPool"
         },
         "Domain":"my-test-user-pool-domain.myapplication.com",
         "ManagedLoginVersion": "2",
         "CustomDomainConfig":{
            "CertificateArn":{
               "Ref":"CertificateArn"
            }
         }
      }
   }
}
```

#### YAML
<a name="aws-resource-cognito-userpooldomain--examples--Creating_a_new_custom_domain_for_a_user_pool--yaml"></a>

```
UserPoolDomain: 
  Type: AWS::Cognito::UserPoolDomain 
  Properties:
    UserPoolId: !Ref UserPool 
    Domain: "my-test-user-pool-domain.myapplication.com"
    ManagedLoginVersion: "2"
    CustomDomainConfig: 
      CertificateArn: !Ref CertificateArn
```

### Creating a new default domain for a user pool
<a name="aws-resource-cognito-userpooldomain--examples--Creating_a_new_default_domain_for_a_user_pool"></a>

The following example creates a new default domain, "my-test-user-pool-domain", in the referenced user pool.

#### JSON
<a name="aws-resource-cognito-userpooldomain--examples--Creating_a_new_default_domain_for_a_user_pool--json"></a>

```
{
   "UserPoolDomain":{
      "Type":"AWS::Cognito::UserPoolDomain",
      "Properties":{
         "UserPoolId":{
            "Ref":"UserPool"
         },
         "Domain":"my-test-user-pool-domain",
         "ManagedLoginVersion": "2"
      }
   }
}
```

#### YAML
<a name="aws-resource-cognito-userpooldomain--examples--Creating_a_new_default_domain_for_a_user_pool--yaml"></a>

```
UserPoolDomain: 
  Type: AWS::Cognito::UserPoolDomain 
  Properties:
    UserPoolId: !Ref UserPool 
    Domain: "my-test-user-pool-domain"
    ManagedLoginVersion: "2"
```

# AWS::Cognito::UserPoolDomain CustomDomainConfigType
<a name="aws-properties-cognito-userpooldomain-customdomainconfigtype"></a>

The configuration for a hosted UI custom domain.

## Syntax
<a name="aws-properties-cognito-userpooldomain-customdomainconfigtype-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpooldomain-customdomainconfigtype-syntax.json"></a>

```
{
  "[CertificateArn](#cfn-cognito-userpooldomain-customdomainconfigtype-certificatearn)" : String
}
```

### YAML
<a name="aws-properties-cognito-userpooldomain-customdomainconfigtype-syntax.yaml"></a>

```
  [CertificateArn](#cfn-cognito-userpooldomain-customdomainconfigtype-certificatearn): String
```

## Properties
<a name="aws-properties-cognito-userpooldomain-customdomainconfigtype-properties"></a>

`CertificateArn`  <a name="cfn-cognito-userpooldomain-customdomainconfigtype-certificatearn"></a>
The Amazon Resource Name (ARN) of an AWS Certificate Manager SSL certificate. You use this certificate for the subdomain of your custom domain.  
*Required*: No  
*Type*: String  
*Pattern*: `arn:[\w+=/,.@-]+:[\w+=/,.@-]+:([\w+=/,.@-]*)?:[0-9]+:[\w+=/,.@-]+(:[\w+=/,.@-]+)?(:[\w+=/,.@-]+)?`  
*Minimum*: `20`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::UserPoolGroup
<a name="aws-resource-cognito-userpoolgroup"></a>

A user pool group. Contains details about the group and the way that it contributes to IAM role decisions with identity pools. Identity pools can make decisions about the IAM role to assign based on groups: users get credentials for the role associated with their highest-priority group.

## Syntax
<a name="aws-resource-cognito-userpoolgroup-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-cognito-userpoolgroup-syntax.json"></a>

```
{
  "Type" : "AWS::Cognito::UserPoolGroup",
  "Properties" : {
      "[Description](#cfn-cognito-userpoolgroup-description)" : String,
      "[GroupName](#cfn-cognito-userpoolgroup-groupname)" : String,
      "[Precedence](#cfn-cognito-userpoolgroup-precedence)" : Integer,
      "[RoleArn](#cfn-cognito-userpoolgroup-rolearn)" : String,
      "[UserPoolId](#cfn-cognito-userpoolgroup-userpoolid)" : String
    }
}
```

### YAML
<a name="aws-resource-cognito-userpoolgroup-syntax.yaml"></a>

```
Type: AWS::Cognito::UserPoolGroup
Properties:
  [Description](#cfn-cognito-userpoolgroup-description): String
  [GroupName](#cfn-cognito-userpoolgroup-groupname): String
  [Precedence](#cfn-cognito-userpoolgroup-precedence): Integer
  [RoleArn](#cfn-cognito-userpoolgroup-rolearn): String
  [UserPoolId](#cfn-cognito-userpoolgroup-userpoolid): String
```

## Properties
<a name="aws-resource-cognito-userpoolgroup-properties"></a>

`Description`  <a name="cfn-cognito-userpoolgroup-description"></a>
A description of the group that you're creating.  
*Required*: No  
*Type*: String  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`GroupName`  <a name="cfn-cognito-userpoolgroup-groupname"></a>
A name for the group. This name must be unique in your user pool.  
*Required*: No  
*Type*: String  
*Pattern*: `[\p{L}\p{M}\p{S}\p{N}\p{P}]+`  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Precedence`  <a name="cfn-cognito-userpoolgroup-precedence"></a>
A non-negative integer value that specifies the precedence of this group relative to the other groups that a user can belong to in the user pool. Zero is the highest precedence value. Groups with lower `Precedence` values take precedence over groups with higher or null `Precedence` values. If a user belongs to two or more groups, it is the group with the lowest precedence value whose role ARN is given in the user's tokens for the `cognito:roles` and `cognito:preferred_role` claims.  
Two groups can have the same `Precedence` value. If this happens, neither group takes precedence over the other. If two groups with the same `Precedence` have the same role ARN, that role is used in the `cognito:preferred_role` claim in tokens for users in each group. If the two groups have different role ARNs, the `cognito:preferred_role` claim isn't set in users' tokens.  
The default `Precedence` value is null. The maximum `Precedence` value is `2^31-1`.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleArn`  <a name="cfn-cognito-userpoolgroup-rolearn"></a>
The Amazon Resource Name (ARN) for the IAM role that you want to associate with the group. A group role primarily declares a preferred role for the credentials that you get from an identity pool. Amazon Cognito ID tokens have a `cognito:preferred_role` claim that presents the highest-precedence group that a user belongs to. Both ID and access tokens also contain a `cognito:groups` claim that list all the groups that a user is a member of.  
*Required*: No  
*Type*: String  
*Pattern*: `arn:[\w+=/,.@-]+:[\w+=/,.@-]+:([\w+=/,.@-]*)?:[0-9]+:[\w+=/,.@-]+(:[\w+=/,.@-]+)?(:[\w+=/,.@-]+)?`  
*Minimum*: `20`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`UserPoolId`  <a name="cfn-cognito-userpoolgroup-userpoolid"></a>
The ID of the user pool where you want to create a user group.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[\w-]+_[0-9a-zA-Z]+`  
*Minimum*: `1`  
*Maximum*: `55`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-cognito-userpoolgroup-return-values"></a>

### Ref
<a name="aws-resource-cognito-userpoolgroup-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the name of the user pool group. For example: `Admins`.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

## Examples
<a name="aws-resource-cognito-userpoolgroup--examples"></a>



### Creating a new user group in a user pool
<a name="aws-resource-cognito-userpoolgroup--examples--Creating_a_new_user_group_in_a_user_pool"></a>

The following example creates a group named "ExampleGroup" with an IAM role and a precedence of 1.

#### JSON
<a name="aws-resource-cognito-userpoolgroup--examples--Creating_a_new_user_group_in_a_user_pool--json"></a>

```
{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Description": "Provision a new user group to an Amazon Cognito user pool\n",
    "Resources": {
        "ExampleGroup": {
            "Properties": {
                "Description": "My Example Group",
                "GroupName": "ExampleGroup",
                "Precedence": 1,
                "RoleArn": "arn:aws:iam::123456789012:role/my-test-cognito-role",
                "UserPoolId": "us-west-2_EXAMPLE"
            },
            "Type": "AWS::Cognito::UserPoolGroup"
        }
    }
}
```

#### YAML
<a name="aws-resource-cognito-userpoolgroup--examples--Creating_a_new_user_group_in_a_user_pool--yaml"></a>

```
AWSTemplateFormatVersion: "2010-09-09"

Description: |
  Provision a new user group to an Amazon Cognito user pool

Resources:
  ExampleGroup:
    Type: AWS::Cognito::UserPoolGroup
    Properties:
      Description: My Example Group
      GroupName: ExampleGroup
      Precedence: 1
      RoleArn: arn:aws:iam::123456789012:role/my-test-cognito-role
      UserPoolId: us-west-2_EXAMPLE
```

# AWS::Cognito::UserPoolIdentityProvider
<a name="aws-resource-cognito-userpoolidentityprovider"></a>

The `AWS::Cognito::UserPoolIdentityProvider` resource creates an identity provider for a user pool.

## Syntax
<a name="aws-resource-cognito-userpoolidentityprovider-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-cognito-userpoolidentityprovider-syntax.json"></a>

```
{
  "Type" : "AWS::Cognito::UserPoolIdentityProvider",
  "Properties" : {
      "[AttributeMapping](#cfn-cognito-userpoolidentityprovider-attributemapping)" : {Key: Value, ...},
      "[IdpIdentifiers](#cfn-cognito-userpoolidentityprovider-idpidentifiers)" : [ String, ... ],
      "[ProviderDetails](#cfn-cognito-userpoolidentityprovider-providerdetails)" : {Key: Value, ...},
      "[ProviderName](#cfn-cognito-userpoolidentityprovider-providername)" : String,
      "[ProviderType](#cfn-cognito-userpoolidentityprovider-providertype)" : String,
      "[UserPoolId](#cfn-cognito-userpoolidentityprovider-userpoolid)" : String
    }
}
```

### YAML
<a name="aws-resource-cognito-userpoolidentityprovider-syntax.yaml"></a>

```
Type: AWS::Cognito::UserPoolIdentityProvider
Properties:
  [AttributeMapping](#cfn-cognito-userpoolidentityprovider-attributemapping): 
    Key: Value
  [IdpIdentifiers](#cfn-cognito-userpoolidentityprovider-idpidentifiers): 
    - String
  [ProviderDetails](#cfn-cognito-userpoolidentityprovider-providerdetails): 
    Key: Value
  [ProviderName](#cfn-cognito-userpoolidentityprovider-providername): String
  [ProviderType](#cfn-cognito-userpoolidentityprovider-providertype): String
  [UserPoolId](#cfn-cognito-userpoolidentityprovider-userpoolid): String
```

## Properties
<a name="aws-resource-cognito-userpoolidentityprovider-properties"></a>

`AttributeMapping`  <a name="cfn-cognito-userpoolidentityprovider-attributemapping"></a>
A mapping of IdP attributes to standard and custom user pool attributes. Specify a user pool attribute as the key of the key-value pair, and the IdP attribute claim name as the value.  
*Required*: No  
*Type*: Object of String  
*Pattern*: `^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`IdpIdentifiers`  <a name="cfn-cognito-userpoolidentityprovider-idpidentifiers"></a>
An array of IdP identifiers, for example `"IdPIdentifiers": [ "MyIdP", "MyIdP2" ]`. Identifiers are friendly names that you can pass in the `idp_identifier` query parameter of requests to the [Authorize endpoint](https://docs.aws.amazon.com/cognito/latest/developerguide/authorization-endpoint.html) to silently redirect to sign-in with the associated IdP. Identifiers in a domain format also enable the use of [email-address matching with SAML providers](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-managing-saml-idp-naming.html).   
*Required*: No  
*Type*: Array of String  
*Minimum*: `0`  
*Maximum*: `50`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ProviderDetails`  <a name="cfn-cognito-userpoolidentityprovider-providerdetails"></a>
The scopes, URLs, and identifiers for your external identity provider. The following examples describe the provider detail keys for each IdP type. These values and their schema are subject to change. Social IdP `authorize_scopes` values must match the values listed here.    
OpenID Connect (OIDC)  
Amazon Cognito accepts the following elements when it can't discover endpoint URLs from `oidc_issuer`: `attributes_url`, `authorize_url`, `jwks_uri`, `token_url`.  
Create or update request: `"ProviderDetails": { "attributes_request_method": "GET", "attributes_url": "https://auth.example.com/userInfo", "authorize_scopes": "openid profile email", "authorize_url": "https://auth.example.com/authorize", "client_id": "1example23456789", "client_secret": "provider-app-client-secret", "jwks_uri": "https://auth.example.com/.well-known/jwks.json", "oidc_issuer": "https://auth.example.com", "token_url": "https://example.com/token" }`  
Describe response: `"ProviderDetails": { "attributes_request_method": "GET", "attributes_url": "https://auth.example.com/userInfo", "attributes_url_add_attributes": "false", "authorize_scopes": "openid profile email", "authorize_url": "https://auth.example.com/authorize", "client_id": "1example23456789", "client_secret": "provider-app-client-secret", "jwks_uri": "https://auth.example.com/.well-known/jwks.json", "oidc_issuer": "https://auth.example.com", "token_url": "https://example.com/token" }`  
SAML  
Create or update request with Metadata URL: `"ProviderDetails": { "IDPInit": "true", "IDPSignout": "true", "EncryptedResponses" : "true", "MetadataURL": "https://auth.example.com/sso/saml/metadata", "RequestSigningAlgorithm": "rsa-sha256" }`  
Create or update request with Metadata file: `"ProviderDetails": { "IDPInit": "true", "IDPSignout": "true", "EncryptedResponses" : "true", "MetadataFile": "[metadata XML]", "RequestSigningAlgorithm": "rsa-sha256" }`  
The value of `MetadataFile` must be the plaintext metadata document with all quote (") characters escaped by backslashes.  
Describe response: `"ProviderDetails": { "IDPInit": "true", "IDPSignout": "true", "EncryptedResponses" : "true", "ActiveEncryptionCertificate": "[certificate]", "MetadataURL": "https://auth.example.com/sso/saml/metadata", "RequestSigningAlgorithm": "rsa-sha256", "SLORedirectBindingURI": "https://auth.example.com/slo/saml", "SSORedirectBindingURI": "https://auth.example.com/sso/saml" }`  
LoginWithAmazon  
Create or update request: `"ProviderDetails": { "authorize_scopes": "profile postal_code", "client_id": "amzn1.application-oa2-client.1example23456789", "client_secret": "provider-app-client-secret"`  
Describe response: `"ProviderDetails": { "attributes_url": "https://api.amazon.com/user/profile", "attributes_url_add_attributes": "false", "authorize_scopes": "profile postal_code", "authorize_url": "https://www.amazon.com/ap/oa", "client_id": "amzn1.application-oa2-client.1example23456789", "client_secret": "provider-app-client-secret", "token_request_method": "POST", "token_url": "https://api.amazon.com/auth/o2/token" }`  
Google  
Create or update request: `"ProviderDetails": { "authorize_scopes": "email profile openid", "client_id": "1example23456789.apps.googleusercontent.com", "client_secret": "provider-app-client-secret" }`  
Describe response: `"ProviderDetails": { "attributes_url": "https://people.googleapis.com/v1/people/me?personFields=", "attributes_url_add_attributes": "true", "authorize_scopes": "email profile openid", "authorize_url": "https://accounts.google.com/o/oauth2/v2/auth", "client_id": "1example23456789.apps.googleusercontent.com", "client_secret": "provider-app-client-secret", "oidc_issuer": "https://accounts.google.com", "token_request_method": "POST", "token_url": "https://www.googleapis.com/oauth2/v4/token" }`  
SignInWithApple  
Create or update request: `"ProviderDetails": { "authorize_scopes": "email name", "client_id": "com.example.cognito", "private_key": "1EXAMPLE", "key_id": "2EXAMPLE", "team_id": "3EXAMPLE" }`  
Describe response: `"ProviderDetails": { "attributes_url_add_attributes": "false", "authorize_scopes": "email name", "authorize_url": "https://appleid.apple.com/auth/authorize", "client_id": "com.example.cognito", "key_id": "1EXAMPLE", "oidc_issuer": "https://appleid.apple.com", "team_id": "2EXAMPLE", "token_request_method": "POST", "token_url": "https://appleid.apple.com/auth/token" }`  
Facebook  
Create or update request: `"ProviderDetails": { "api_version": "v17.0", "authorize_scopes": "public_profile, email", "client_id": "1example23456789", "client_secret": "provider-app-client-secret" }`  
Describe response: `"ProviderDetails": { "api_version": "v17.0", "attributes_url": "https://graph.facebook.com/v17.0/me?fields=", "attributes_url_add_attributes": "true", "authorize_scopes": "public_profile, email", "authorize_url": "https://www.facebook.com/v17.0/dialog/oauth", "client_id": "1example23456789", "client_secret": "provider-app-client-secret", "token_request_method": "GET", "token_url": "https://graph.facebook.com/v17.0/oauth/access_token" }`
*Required*: Yes  
*Type*: Object of String  
*Pattern*: `^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ProviderName`  <a name="cfn-cognito-userpoolidentityprovider-providername"></a>
The name that you want to assign to the IdP. You can pass the identity provider name in the `identity_provider` query parameter of requests to the [Authorize endpoint](https://docs.aws.amazon.com/cognito/latest/developerguide/authorization-endpoint.html) to silently redirect to sign-in with the associated IdP.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[^_\p{Z}][\p{L}\p{M}\p{S}\p{N}\p{P}][^_\p{Z}]+`  
*Minimum*: `1`  
*Maximum*: `32`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ProviderType`  <a name="cfn-cognito-userpoolidentityprovider-providertype"></a>
The type of IdP that you want to add. Amazon Cognito supports OIDC, SAML 2.0, Login With Amazon, Sign In With Apple, Google, and Facebook IdPs.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `SAML | Facebook | Google | LoginWithAmazon | SignInWithApple | OIDC`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`UserPoolId`  <a name="cfn-cognito-userpoolidentityprovider-userpoolid"></a>
The Id of the user pool where you want to create an IdP.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[\w-]+_[0-9a-zA-Z]+`  
*Minimum*: `1`  
*Maximum*: `55`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-cognito-userpoolidentityprovider-return-values"></a>

### Ref
<a name="aws-resource-cognito-userpoolidentityprovider-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns physicalResourceId, which is “ProviderName". For example:

 `{ "Ref": "testProvider" }` 

For the Amazon Cognito identity provider `testProvider`, Ref returns the name of the identity provider.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

## Examples
<a name="aws-resource-cognito-userpoolidentityprovider--examples"></a>



**Topics**
+ [Creating a new Login with Amazon identity provider](#aws-resource-cognito-userpoolidentityprovider--examples--Creating_a_new_Login_with_Amazon_identity_provider)
+ [Creating a new Google identity provider](#aws-resource-cognito-userpoolidentityprovider--examples--Creating_a_new_Google_identity_provider)
+ [Creating a new Facebook identity provider](#aws-resource-cognito-userpoolidentityprovider--examples--Creating_a_new_Facebook_identity_provider)
+ [Creating a new Sign in with Apple identity provider](#aws-resource-cognito-userpoolidentityprovider--examples--Creating_a_new_Sign_in_with_Apple_identity_provider)
+ [Creating a new OIDC identity provider](#aws-resource-cognito-userpoolidentityprovider--examples--Creating_a_new_OIDC_identity_provider)
+ [Creating a new SAML identity provider](#aws-resource-cognito-userpoolidentityprovider--examples--Creating_a_new_SAML_identity_provider)

### Creating a new Login with Amazon identity provider
<a name="aws-resource-cognito-userpoolidentityprovider--examples--Creating_a_new_Login_with_Amazon_identity_provider"></a>

The following example creates a Login with Amazon identity provider in the referenced user pool.

#### JSON
<a name="aws-resource-cognito-userpoolidentityprovider--examples--Creating_a_new_Login_with_Amazon_identity_provider--json"></a>

```
{
  "UserPoolIdentityProvider": {
    "Type": "AWS::Cognito::UserPoolIdentityProvider",
    "Properties": {
      "UserPoolId": {
        "Ref": "UserPool"
      },
      "ProviderName": "LoginWithAmazon",
      "ProviderDetails": {
        "client_id": "YourLoginWithAmazonAppId",
        "client_secret": "YourLoginWithAmazonAppSecret",
        "authorize_scopes": "profile postal_code"
      },
      "ProviderType": "LoginWithAmazon",
      "AttributeMapping": {
        "email": "email"
      }
    }
  }
}
```

#### YAML
<a name="aws-resource-cognito-userpoolidentityprovider--examples--Creating_a_new_Login_with_Amazon_identity_provider--yaml"></a>

```
UserPoolIdentityProvider:
  Type: AWS::Cognito::UserPoolIdentityProvider
  Properties:
    UserPoolId: !Ref UserPool
    ProviderName: "LoginWithAmazon"
    ProviderDetails:
      client_id: "YourLoginWithAmazonAppId"
      client_secret: "YourLoginWithAmazonAppSecret"
      authorize_scopes: "profile postal_code"
    ProviderType: "LoginWithAmazon"
    AttributeMapping:
      email: "email"
```

### Creating a new Google identity provider
<a name="aws-resource-cognito-userpoolidentityprovider--examples--Creating_a_new_Google_identity_provider"></a>

The following example creates a Google identity provider in the referenced user pool.

#### JSON
<a name="aws-resource-cognito-userpoolidentityprovider--examples--Creating_a_new_Google_identity_provider--json"></a>

```
{
  "UserPoolIdentityProvider": {
    "Type": "AWS::Cognito::UserPoolIdentityProvider",
    "Properties": {
      "UserPoolId": {
        "Ref": "UserPool"
      },
      "ProviderName": "Google",
      "ProviderDetails": {
        "client_id": "YourGoogleAppId",
        "client_secret": "YourGoogleAppSecret",
        "authorize_scopes": "profile email openid"
      },
      "ProviderType": "Google",
      "AttributeMapping": {
        "email": "email"
      }
    }
  }
}
```

#### YAML
<a name="aws-resource-cognito-userpoolidentityprovider--examples--Creating_a_new_Google_identity_provider--yaml"></a>

```
UserPoolIdentityProvider:
  Type: AWS::Cognito::UserPoolIdentityProvider
  Properties:
    UserPoolId: !Ref UserPool
    ProviderName: "Google"
    ProviderDetails:
      client_id: "YourGoogleAppId"
      client_secret: "YourGoogleAppSecret"
      authorize_scopes: "profile email openid"
    ProviderType: "Google"
    AttributeMapping:
      email: "email"
```

### Creating a new Facebook identity provider
<a name="aws-resource-cognito-userpoolidentityprovider--examples--Creating_a_new_Facebook_identity_provider"></a>

The following example creates a Facebook identity provider in the referenced user pool.

#### JSON
<a name="aws-resource-cognito-userpoolidentityprovider--examples--Creating_a_new_Facebook_identity_provider--json"></a>

```
{
  "UserPoolIdentityProvider": {
    "Type": "AWS::Cognito::UserPoolIdentityProvider",
    "Properties": {
      "UserPoolId": {
        "Ref": "UserPool"
      },
      "ProviderName": "Facebook",
      "ProviderDetails": {
        "client_id": "YourFacebookAppId",
        "client_secret": "YourFacebookAppSecret",
        "authorize_scopes": "public_profile,email"
      },
      "ProviderType": "Facebook",
      "AttributeMapping": {
        "email": "email"
      }
    }
  }
}
```

#### YAML
<a name="aws-resource-cognito-userpoolidentityprovider--examples--Creating_a_new_Facebook_identity_provider--yaml"></a>

```
UserPoolIdentityProvider:
  Type: AWS::Cognito::UserPoolIdentityProvider
  Properties:
    UserPoolId: !Ref UserPool
    ProviderName: "Facebook"
    ProviderDetails:
      client_id: "YourFacebookAppId"
      client_secret: "YourFacebookAppSecret"
      authorize_scopes: "public_profile,email"
    ProviderType: "Facebook"
    AttributeMapping:
      email: "email"
```

### Creating a new Sign in with Apple identity provider
<a name="aws-resource-cognito-userpoolidentityprovider--examples--Creating_a_new_Sign_in_with_Apple_identity_provider"></a>

The following example creates a Sign in with Apple identity provider in the referenced user pool.

#### JSON
<a name="aws-resource-cognito-userpoolidentityprovider--examples--Creating_a_new_Sign_in_with_Apple_identity_provider--json"></a>

```
{
  "UserPoolIdentityProvider": {
    "Type": "AWS::Cognito::UserPoolIdentityProvider",
    "Properties": {
      "UserPoolId": {
        "Ref": "UserPool"
      },
      "ProviderName": "SignInWithApple",
      "ProviderDetails": {
        "client_id": "YourAppleServicesId",
        "team_id": "YourAppleTeamId",
        "key_id": "YourApplePrivateKeyID",
        "private_key": "YourApplePrivateKey",
        "authorize_scopes": "public_profile,email"
      },
      "ProviderType": "SignInWithApple",
      "AttributeMapping": {
        "email": "email"
      }
    }
  }
}
```

#### YAML
<a name="aws-resource-cognito-userpoolidentityprovider--examples--Creating_a_new_Sign_in_with_Apple_identity_provider--yaml"></a>

```
UserPoolIdentityProvider:
  Type: AWS::Cognito::UserPoolIdentityProvider
  Properties:
    UserPoolId: !Ref UserPool
    ProviderName: "SignInWithApple"
    ProviderDetails:
      client_id: "YourSign"
      team_id: "YourAppleTeamId"
      key_id: "YourApplePrivateKeyID"
      private_key: "YourApplePrivateKey"
      authorize_scopes: "public_profile,email"
    ProviderType: "SignInWithApple"
    AttributeMapping:
      email: "email"
```

### Creating a new OIDC identity provider
<a name="aws-resource-cognito-userpoolidentityprovider--examples--Creating_a_new_OIDC_identity_provider"></a>

The following example creates the OIDC identity provider "YourOIDCProviderName" in the referenced user pool.

#### JSON
<a name="aws-resource-cognito-userpoolidentityprovider--examples--Creating_a_new_OIDC_identity_provider--json"></a>

```
{
  "UserPoolIdentityProvider": {
    "Type": "AWS::Cognito::UserPoolIdentityProvider",
    "Properties": {
      "UserPoolId": {
        "Ref": "UserPool"
      },
      "ProviderName": "YourOIDCProviderName",
      "ProviderDetails": {
        "client_id": "YourOIDCClientId",
        "client_secret": "YourOIDCClientSecret",
        "attributes_request_method": "GET",
        "oidc_issuer": "YourOIDCIssuerURL",
        "authorize_scopes": "email profile openid"
      },
      "ProviderType": "OIDC",
      "AttributeMapping": {
        "email": "email"
      },
      "IdpIdentifiers": [
        "IdpIdentifier"
      ]
    }
  }
}
```

#### YAML
<a name="aws-resource-cognito-userpoolidentityprovider--examples--Creating_a_new_OIDC_identity_provider--yaml"></a>

```
UserPoolIdentityProvider:
  Type: AWS::Cognito::UserPoolIdentityProvider
  Properties:
    UserPoolId: !Ref UserPool
    ProviderName: "YourOIDCProviderName"
    ProviderDetails:
      client_id: "YourOIDCClientId"
      client_secret: "YourOIDCClientSecret"
      attributes_request_method: "GET"
      oidc_issuer: "YourOIDCIssuerURL"
      authorize_scopes: "email profile openid"
    ProviderType: "OIDC"
    AttributeMapping:
      email: "email"
    IdpIdentifiers:
      - "IdpIdentifier"
```

### Creating a new SAML identity provider
<a name="aws-resource-cognito-userpoolidentityprovider--examples--Creating_a_new_SAML_identity_provider"></a>

The following example creates a SAML identity provider "YourProviderName" in the referenced user pool.

#### JSON
<a name="aws-resource-cognito-userpoolidentityprovider--examples--Creating_a_new_SAML_identity_provider--json"></a>

```
{
   "UserPoolIdentityProvider": {
      "Type": "AWS::Cognito::UserPoolIdentityProvider",
      "Properties": {
         "UserPoolId": {"Ref": "UserPool"},
         "ProviderName": "YourProviderName",
         "ProviderDetails": {
            "MetadataURL": "YourMetadataURL"
         },
         "ProviderType": "SAML",
         "AttributeMapping": {
            "email": "Attribute"
         },
         "IdpIdentifiers": [
            "IdpIdentifier"
         ]
      }
   }
}
```

#### YAML
<a name="aws-resource-cognito-userpoolidentityprovider--examples--Creating_a_new_SAML_identity_provider--yaml"></a>

```
UserPoolIdentityProvider:
  Type: AWS::Cognito::UserPoolIdentityProvider
  Properties:
    UserPoolId: !Ref UserPool
    ProviderName: "YourProviderName"
    ProviderDetails:
      MetadataURL: "YourMetadataURL"
    ProviderType: "SAML"
    AttributeMapping:
      email: "Attribute"
    IdpIdentifiers:
      - "IdpIdentifier"
```

# AWS::Cognito::UserPoolResourceServer
<a name="aws-resource-cognito-userpoolresourceserver"></a>

The `AWS::Cognito::UserPoolResourceServer` resource creates a new OAuth2.0 resource server and defines custom scopes in it.

**Note**  
If you don't specify a value for a parameter, Amazon Cognito sets it to a default value.

## Syntax
<a name="aws-resource-cognito-userpoolresourceserver-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-cognito-userpoolresourceserver-syntax.json"></a>

```
{
  "Type" : "AWS::Cognito::UserPoolResourceServer",
  "Properties" : {
      "[Identifier](#cfn-cognito-userpoolresourceserver-identifier)" : String,
      "[Name](#cfn-cognito-userpoolresourceserver-name)" : String,
      "[Scopes](#cfn-cognito-userpoolresourceserver-scopes)" : [ ResourceServerScopeType, ... ],
      "[UserPoolId](#cfn-cognito-userpoolresourceserver-userpoolid)" : String
    }
}
```

### YAML
<a name="aws-resource-cognito-userpoolresourceserver-syntax.yaml"></a>

```
Type: AWS::Cognito::UserPoolResourceServer
Properties:
  [Identifier](#cfn-cognito-userpoolresourceserver-identifier): String
  [Name](#cfn-cognito-userpoolresourceserver-name): String
  [Scopes](#cfn-cognito-userpoolresourceserver-scopes): 
    - ResourceServerScopeType
  [UserPoolId](#cfn-cognito-userpoolresourceserver-userpoolid): String
```

## Properties
<a name="aws-resource-cognito-userpoolresourceserver-properties"></a>

`Identifier`  <a name="cfn-cognito-userpoolresourceserver-identifier"></a>
A unique resource server identifier for the resource server. The identifier can be an API friendly name like `solar-system-data`. You can also set an API URL like `https://solar-system-data-api.example.com` as your identifier.  
Amazon Cognito represents scopes in the access token in the format `$resource-server-identifier/$scope`. Longer scope-identifier strings increase the size of your access tokens.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[\x21\x23-\x5B\x5D-\x7E]+`  
*Minimum*: `1`  
*Maximum*: `256`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Name`  <a name="cfn-cognito-userpoolresourceserver-name"></a>
A friendly name for the resource server.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[\w\s+=,.@-]+`  
*Minimum*: `1`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Scopes`  <a name="cfn-cognito-userpoolresourceserver-scopes"></a>
A list of scopes. Each scope is a map with keys `ScopeName` and `ScopeDescription`.  
*Required*: No  
*Type*: Array of [ResourceServerScopeType](aws-properties-cognito-userpoolresourceserver-resourceserverscopetype.md)  
*Maximum*: `100`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`UserPoolId`  <a name="cfn-cognito-userpoolresourceserver-userpoolid"></a>
The ID of the user pool where you want to create a resource server.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[\w-]+_[0-9a-zA-Z]+`  
*Minimum*: `1`  
*Maximum*: `55`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-cognito-userpoolresourceserver-return-values"></a>

### Ref
<a name="aws-resource-cognito-userpoolresourceserver-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns physicalResourceId, which is the resource server identifier “Identifier". For example:

 `{ "Ref": "yourResourceServerIdentifier" }` 

For the Amazon Cognito resource server `yourResourceServerIdentifier`, Ref returns the name of the resource server.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

## Examples
<a name="aws-resource-cognito-userpoolresourceserver--examples"></a>



### Creating a new resource server for a user pool
<a name="aws-resource-cognito-userpoolresourceserver--examples--Creating_a_new_resource_server_for_a_user_pool"></a>

The following example creates a resource server "Name" with the identifier "Identifier" in the referenced user pool.

#### JSON
<a name="aws-resource-cognito-userpoolresourceserver--examples--Creating_a_new_resource_server_for_a_user_pool--json"></a>

```
{
  "UserPoolResourceServer": {
    "Type": "AWS::Cognito::UserPoolResourceServer",
    "Properties": {
      "UserPoolId": {
        "Ref": "UserPool"
      },
      "Identifier": "Identifier",
      "Name": "Name",
      "Scopes": [{
        "ScopeName": "ScopeName1",
        "ScopeDescription": "description"
      }, {
        "ScopeName": "ScopeName2",
        "ScopeDescription": "description"
      }]
    }
  }
}
```

#### YAML
<a name="aws-resource-cognito-userpoolresourceserver--examples--Creating_a_new_resource_server_for_a_user_pool--yaml"></a>

```
UserPoolResourceServer: 
  Type: AWS::Cognito::UserPoolResourceServer
  Properties: 
    UserPoolId: !Ref UserPool 
    Identifier: "Identifier" 
    Name: "Name" 
    Scopes: 
     - ScopeName: "ScopeName1" 
       ScopeDescription: "description" 
     - ScopeName: "ScopeName2"
       ScopeDescription: "description"
```

# AWS::Cognito::UserPoolResourceServer ResourceServerScopeType
<a name="aws-properties-cognito-userpoolresourceserver-resourceserverscopetype"></a>

One custom scope associated with a user pool resource server. This data type is a member of `ResourceServerScopeType`. For more information, see [ Scopes, M2M, and API authorization with resource servers](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-define-resource-servers.html). 

## Syntax
<a name="aws-properties-cognito-userpoolresourceserver-resourceserverscopetype-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpoolresourceserver-resourceserverscopetype-syntax.json"></a>

```
{
  "[ScopeDescription](#cfn-cognito-userpoolresourceserver-resourceserverscopetype-scopedescription)" : String,
  "[ScopeName](#cfn-cognito-userpoolresourceserver-resourceserverscopetype-scopename)" : String
}
```

### YAML
<a name="aws-properties-cognito-userpoolresourceserver-resourceserverscopetype-syntax.yaml"></a>

```
  [ScopeDescription](#cfn-cognito-userpoolresourceserver-resourceserverscopetype-scopedescription): String
  [ScopeName](#cfn-cognito-userpoolresourceserver-resourceserverscopetype-scopename): String
```

## Properties
<a name="aws-properties-cognito-userpoolresourceserver-resourceserverscopetype-properties"></a>

`ScopeDescription`  <a name="cfn-cognito-userpoolresourceserver-resourceserverscopetype-scopedescription"></a>
A friendly description of a custom scope.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ScopeName`  <a name="cfn-cognito-userpoolresourceserver-resourceserverscopetype-scopename"></a>
The name of the scope. Amazon Cognito renders custom scopes in the format `resourceServerIdentifier/ScopeName`. For example, if this parameter is `exampleScope` in the resource server with the identifier `exampleResourceServer`, you request and receive the scope `exampleResourceServer/exampleScope`.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[\x21\x23-\x2E\x30-\x5B\x5D-\x7E]+`  
*Minimum*: `1`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::UserPoolRiskConfigurationAttachment
<a name="aws-resource-cognito-userpoolriskconfigurationattachment"></a>

The `AWS::Cognito::UserPoolRiskConfigurationAttachment` resource sets the risk configuration that is used for Amazon Cognito advanced security features.

You can specify risk configuration for a single client (with a specific `clientId`) or for all clients (by setting the `clientId` to `ALL`). If you specify `ALL`, the default configuration is used for every client that has had no risk configuration set previously. If you specify risk configuration for a particular client, it no longer falls back to the `ALL` configuration.

## Syntax
<a name="aws-resource-cognito-userpoolriskconfigurationattachment-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-cognito-userpoolriskconfigurationattachment-syntax.json"></a>

```
{
  "Type" : "AWS::Cognito::UserPoolRiskConfigurationAttachment",
  "Properties" : {
      "[AccountTakeoverRiskConfiguration](#cfn-cognito-userpoolriskconfigurationattachment-accounttakeoverriskconfiguration)" : AccountTakeoverRiskConfigurationType,
      "[ClientId](#cfn-cognito-userpoolriskconfigurationattachment-clientid)" : String,
      "[CompromisedCredentialsRiskConfiguration](#cfn-cognito-userpoolriskconfigurationattachment-compromisedcredentialsriskconfiguration)" : CompromisedCredentialsRiskConfigurationType,
      "[RiskExceptionConfiguration](#cfn-cognito-userpoolriskconfigurationattachment-riskexceptionconfiguration)" : RiskExceptionConfigurationType,
      "[UserPoolId](#cfn-cognito-userpoolriskconfigurationattachment-userpoolid)" : String
    }
}
```

### YAML
<a name="aws-resource-cognito-userpoolriskconfigurationattachment-syntax.yaml"></a>

```
Type: AWS::Cognito::UserPoolRiskConfigurationAttachment
Properties:
  [AccountTakeoverRiskConfiguration](#cfn-cognito-userpoolriskconfigurationattachment-accounttakeoverriskconfiguration): 
    AccountTakeoverRiskConfigurationType
  [ClientId](#cfn-cognito-userpoolriskconfigurationattachment-clientid): String
  [CompromisedCredentialsRiskConfiguration](#cfn-cognito-userpoolriskconfigurationattachment-compromisedcredentialsriskconfiguration): 
    CompromisedCredentialsRiskConfigurationType
  [RiskExceptionConfiguration](#cfn-cognito-userpoolriskconfigurationattachment-riskexceptionconfiguration): 
    RiskExceptionConfigurationType
  [UserPoolId](#cfn-cognito-userpoolriskconfigurationattachment-userpoolid): String
```

## Properties
<a name="aws-resource-cognito-userpoolriskconfigurationattachment-properties"></a>

`AccountTakeoverRiskConfiguration`  <a name="cfn-cognito-userpoolriskconfigurationattachment-accounttakeoverriskconfiguration"></a>
The settings for automated responses and notification templates for adaptive authentication with threat protection.  
*Required*: No  
*Type*: [AccountTakeoverRiskConfigurationType](aws-properties-cognito-userpoolriskconfigurationattachment-accounttakeoverriskconfigurationtype.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ClientId`  <a name="cfn-cognito-userpoolriskconfigurationattachment-clientid"></a>
The app client where this configuration is applied. When this parameter isn't present, the risk configuration applies to all user pool app clients that don't have client-level settings.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[\w+]+`  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`CompromisedCredentialsRiskConfiguration`  <a name="cfn-cognito-userpoolriskconfigurationattachment-compromisedcredentialsriskconfiguration"></a>
Settings for compromised-credentials actions and authentication types with threat protection in full-function `ENFORCED` mode.  
*Required*: No  
*Type*: [CompromisedCredentialsRiskConfigurationType](aws-properties-cognito-userpoolriskconfigurationattachment-compromisedcredentialsriskconfigurationtype.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RiskExceptionConfiguration`  <a name="cfn-cognito-userpoolriskconfigurationattachment-riskexceptionconfiguration"></a>
Exceptions to the risk evaluation configuration, including always-allow and always-block IP address ranges.   
*Required*: No  
*Type*: [RiskExceptionConfigurationType](aws-properties-cognito-userpoolriskconfigurationattachment-riskexceptionconfigurationtype.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`UserPoolId`  <a name="cfn-cognito-userpoolriskconfigurationattachment-userpoolid"></a>
The ID of the user pool that has the risk configuration applied.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[\w-]+_[0-9a-zA-Z]+`  
*Minimum*: `1`  
*Maximum*: `55`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-cognito-userpoolriskconfigurationattachment-return-values"></a>

### Ref
<a name="aws-resource-cognito-userpoolriskconfigurationattachment-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the physicalResourceId, which is “UserPoolRiskConfigurationAttachment-UserPoolId-ClientId". For example:

 `{ "Ref": “UserPoolRiskConfigurationAttachment-us-east-1_FAKEPOOLID-2asc123fakeclientidajjulj6bh” }` 

For the Amazon Cognito risk configuration attachment `UserPoolRiskConfigurationAttachment-us-east-1_FAKEPOOLID-2asc123fakeclientidajjulj6bh`, Ref returns the name of the risk configuration attachment.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

## Examples
<a name="aws-resource-cognito-userpoolriskconfigurationattachment--examples"></a>



### Creating a new risk configuration attachment for a user pool
<a name="aws-resource-cognito-userpoolriskconfigurationattachment--examples--Creating_a_new_risk_configuration_attachment_for_a_user_pool"></a>

The following example sets risk configurations in the referenced user pool and client.

#### JSON
<a name="aws-resource-cognito-userpoolriskconfigurationattachment--examples--Creating_a_new_risk_configuration_attachment_for_a_user_pool--json"></a>

```
{
   "UserPoolRiskConfiguration":{
      "Type":"AWS::Cognito::UserPoolRiskConfigurationAttachment",
      "Properties":{
         "UserPoolId":{
            "Ref":"UserPool"
         },
         "ClientId":{
            "Ref":"Client"
         },
         "AccountTakeoverRiskConfiguration":{
            "Actions":{
               "HighAction":{
                  "EventAction":"MFA_REQUIRED",
                  "Notify":true,

               },
               "MediumAction":{
                  "EventAction":"MFA_IF_CONFIGURED",
                  "Notify":true
               },
               "LowAction":{
                  "EventAction":{
                     "Ref":"EventAction"
                  },
                  "Notify":false
               }
            },
            "NotifyConfiguration":{
               "BlockEmail":{
                  "HtmlBody":"html body",
                  "Subject":"Your account got blocked",
                  "TextBody":"Your account got blocked"
               },
               "MfaEmail":{
                  "HtmlBody":"html body",
                  "Subject":"Your account needs MFA verification",
                  "TextBody":"Your account needs MFA verification"
               },
               "NoActionEmail":{
                  "HtmlBody":{
                     "Ref":"HtmlBody"
                  },
                  "Subject":{
                     "Ref":"Subject"
                  },
                  "TextBody":{
                     "Ref":"TextBody"
                  },

               },
               "From":"your-from-email@amazon.com",
               "SourceArn":{
                  "Ref":"SourceArn"
               },
               "ReplyTo":"your-reply-to@amazon.com"
            }
         },
         "CompromisedCredentialsRiskConfiguration":{
            "Actions":{
               "EventAction":"BLOCK"
            },
            "EventFilter":[
               {
                  "Ref":"EventFilter"
               },

            ]
         },
         "RiskExceptionConfiguration":{
            "BlockedIPRangeList":[
               "198.0.0.1"
            ],
            "SkippedIPRangeList":[
               "198.0.0.1"
            ]
         }
      }
   }
}
```

#### YAML
<a name="aws-resource-cognito-userpoolriskconfigurationattachment--examples--Creating_a_new_risk_configuration_attachment_for_a_user_pool--yaml"></a>

```
UserPoolRiskConfiguration: 
  Type: AWS::Cognito::UserPoolRiskConfigurationAttachment 
  Properties: 
    UserPoolId: !Ref UserPool
    ClientId: !Ref Client 
    AccountTakeoverRiskConfiguration: 
      Actions: 
        HighAction: 
          EventAction: "MFA_REQUIRED" 
          Notify: True 
        MediumAction: 
          EventAction: "MFA_IF_CONFIGURED" 
          Notify: True
        LowAction: 
          EventAction: !Ref LowEventAction 
          Notify: False 
      NotifyConfiguration: 
        BlockEmail:
          HtmlBody: "html body" 
          Subject: "Your account got blocked" 
          TextBody: "Your account got blocked" 
        MfaEmail: 
          HtmlBody: "html body" 
          Subject: "Your account needs MFA verification"
          TextBody: "Your account needs MFA verification" 
        NoActionEmail: 
          HtmlBody: !Ref HtmlBody
          Subject: !Ref Subject 
          TextBody: !Ref TextBody 
        From: "your-from-email@amazon.com" 
        SourceArn: !Ref SourceArn 
        ReplyTo: "your-reply-to@amazon.com" 
    CompromisedCredentialsRiskConfiguration:
      Actions: 
        EventAction: "BLOCK" 
        EventFilter: - !Ref EventFilter 
    RiskExceptionConfiguration:
        BlockedIPRangeList: 
          - "198.0.0.1" 
        SkippedIPRangeList: 
          - "198.0.0.1"
```

# AWS::Cognito::UserPoolRiskConfigurationAttachment AccountTakeoverActionsType
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-accounttakeoveractionstype"></a>

A list of account-takeover actions for each level of risk that Amazon Cognito might assess with advanced security features.

## Syntax
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-accounttakeoveractionstype-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-accounttakeoveractionstype-syntax.json"></a>

```
{
  "[HighAction](#cfn-cognito-userpoolriskconfigurationattachment-accounttakeoveractionstype-highaction)" : AccountTakeoverActionType,
  "[LowAction](#cfn-cognito-userpoolriskconfigurationattachment-accounttakeoveractionstype-lowaction)" : AccountTakeoverActionType,
  "[MediumAction](#cfn-cognito-userpoolriskconfigurationattachment-accounttakeoveractionstype-mediumaction)" : AccountTakeoverActionType
}
```

### YAML
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-accounttakeoveractionstype-syntax.yaml"></a>

```
  [HighAction](#cfn-cognito-userpoolriskconfigurationattachment-accounttakeoveractionstype-highaction): 
    AccountTakeoverActionType
  [LowAction](#cfn-cognito-userpoolriskconfigurationattachment-accounttakeoveractionstype-lowaction): 
    AccountTakeoverActionType
  [MediumAction](#cfn-cognito-userpoolriskconfigurationattachment-accounttakeoveractionstype-mediumaction): 
    AccountTakeoverActionType
```

## Properties
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-accounttakeoveractionstype-properties"></a>

`HighAction`  <a name="cfn-cognito-userpoolriskconfigurationattachment-accounttakeoveractionstype-highaction"></a>
The action that you assign to a high-risk assessment by threat protection.  
*Required*: No  
*Type*: [AccountTakeoverActionType](aws-properties-cognito-userpoolriskconfigurationattachment-accounttakeoveractiontype.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LowAction`  <a name="cfn-cognito-userpoolriskconfigurationattachment-accounttakeoveractionstype-lowaction"></a>
The action that you assign to a low-risk assessment by threat protection.  
*Required*: No  
*Type*: [AccountTakeoverActionType](aws-properties-cognito-userpoolriskconfigurationattachment-accounttakeoveractiontype.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MediumAction`  <a name="cfn-cognito-userpoolriskconfigurationattachment-accounttakeoveractionstype-mediumaction"></a>
The action that you assign to a medium-risk assessment by threat protection.  
*Required*: No  
*Type*: [AccountTakeoverActionType](aws-properties-cognito-userpoolriskconfigurationattachment-accounttakeoveractiontype.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::UserPoolRiskConfigurationAttachment AccountTakeoverActionType
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-accounttakeoveractiontype"></a>

The automated response to a risk level for adaptive authentication in full-function, or `ENFORCED`, mode. You can assign an action to each risk level that advanced security features evaluates.

## Syntax
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-accounttakeoveractiontype-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-accounttakeoveractiontype-syntax.json"></a>

```
{
  "[EventAction](#cfn-cognito-userpoolriskconfigurationattachment-accounttakeoveractiontype-eventaction)" : String,
  "[Notify](#cfn-cognito-userpoolriskconfigurationattachment-accounttakeoveractiontype-notify)" : Boolean
}
```

### YAML
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-accounttakeoveractiontype-syntax.yaml"></a>

```
  [EventAction](#cfn-cognito-userpoolriskconfigurationattachment-accounttakeoveractiontype-eventaction): String
  [Notify](#cfn-cognito-userpoolriskconfigurationattachment-accounttakeoveractiontype-notify): Boolean
```

## Properties
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-accounttakeoveractiontype-properties"></a>

`EventAction`  <a name="cfn-cognito-userpoolriskconfigurationattachment-accounttakeoveractiontype-eventaction"></a>
The action to take for the attempted account takeover action for the associated risk level. Valid values are as follows:  
+ `BLOCK`: Block the request.
+ `MFA_IF_CONFIGURED`: Present an MFA challenge if possible. MFA is possible if the user pool has active MFA methods that the user can set up. For example, if the user pool only supports SMS message MFA but the user doesn't have a phone number attribute, MFA setup isn't possible. If MFA setup isn't possible, allow the request.
+ `MFA_REQUIRED`: Present an MFA challenge if possible. Block the request if a user hasn't set up MFA. To sign in with required MFA, users must have an email address or phone number attribute, or a registered TOTP factor.
+ `NO_ACTION`: Take no action. Permit sign-in.
*Required*: Yes  
*Type*: String  
*Allowed values*: `BLOCK | MFA_IF_CONFIGURED | MFA_REQUIRED | NO_ACTION`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Notify`  <a name="cfn-cognito-userpoolriskconfigurationattachment-accounttakeoveractiontype-notify"></a>
Determines whether Amazon Cognito sends a user a notification message when your user pools assesses a user's session at the associated risk level.  
*Required*: Yes  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::UserPoolRiskConfigurationAttachment AccountTakeoverRiskConfigurationType
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-accounttakeoverriskconfigurationtype"></a>

The settings for automated responses and notification templates for adaptive authentication with advanced security features.

## Syntax
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-accounttakeoverriskconfigurationtype-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-accounttakeoverriskconfigurationtype-syntax.json"></a>

```
{
  "[Actions](#cfn-cognito-userpoolriskconfigurationattachment-accounttakeoverriskconfigurationtype-actions)" : AccountTakeoverActionsType,
  "[NotifyConfiguration](#cfn-cognito-userpoolriskconfigurationattachment-accounttakeoverriskconfigurationtype-notifyconfiguration)" : NotifyConfigurationType
}
```

### YAML
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-accounttakeoverriskconfigurationtype-syntax.yaml"></a>

```
  [Actions](#cfn-cognito-userpoolriskconfigurationattachment-accounttakeoverriskconfigurationtype-actions): 
    AccountTakeoverActionsType
  [NotifyConfiguration](#cfn-cognito-userpoolriskconfigurationattachment-accounttakeoverriskconfigurationtype-notifyconfiguration): 
    NotifyConfigurationType
```

## Properties
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-accounttakeoverriskconfigurationtype-properties"></a>

`Actions`  <a name="cfn-cognito-userpoolriskconfigurationattachment-accounttakeoverriskconfigurationtype-actions"></a>
A list of account-takeover actions for each level of risk that Amazon Cognito might assess with threat protection.  
*Required*: Yes  
*Type*: [AccountTakeoverActionsType](aws-properties-cognito-userpoolriskconfigurationattachment-accounttakeoveractionstype.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`NotifyConfiguration`  <a name="cfn-cognito-userpoolriskconfigurationattachment-accounttakeoverriskconfigurationtype-notifyconfiguration"></a>
The settings for composing and sending an email message when threat protection assesses a risk level with adaptive authentication. When you choose to notify users in `AccountTakeoverRiskConfiguration`, Amazon Cognito sends an email message using the method and template that you set with this data type.  
*Required*: No  
*Type*: [NotifyConfigurationType](aws-properties-cognito-userpoolriskconfigurationattachment-notifyconfigurationtype.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::UserPoolRiskConfigurationAttachment CompromisedCredentialsActionsType
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-compromisedcredentialsactionstype"></a>

Settings for user pool actions when Amazon Cognito detects compromised credentials with advanced security features in full-function `ENFORCED` mode.

## Syntax
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-compromisedcredentialsactionstype-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-compromisedcredentialsactionstype-syntax.json"></a>

```
{
  "[EventAction](#cfn-cognito-userpoolriskconfigurationattachment-compromisedcredentialsactionstype-eventaction)" : String
}
```

### YAML
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-compromisedcredentialsactionstype-syntax.yaml"></a>

```
  [EventAction](#cfn-cognito-userpoolriskconfigurationattachment-compromisedcredentialsactionstype-eventaction): String
```

## Properties
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-compromisedcredentialsactionstype-properties"></a>

`EventAction`  <a name="cfn-cognito-userpoolriskconfigurationattachment-compromisedcredentialsactionstype-eventaction"></a>
The action that Amazon Cognito takes when it detects compromised credentials.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `BLOCK | NO_ACTION`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::UserPoolRiskConfigurationAttachment CompromisedCredentialsRiskConfigurationType
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-compromisedcredentialsriskconfigurationtype"></a>

Settings for compromised-credentials actions and authentication-event sources with advanced security features in full-function `ENFORCED` mode.

## Syntax
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-compromisedcredentialsriskconfigurationtype-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-compromisedcredentialsriskconfigurationtype-syntax.json"></a>

```
{
  "[Actions](#cfn-cognito-userpoolriskconfigurationattachment-compromisedcredentialsriskconfigurationtype-actions)" : CompromisedCredentialsActionsType,
  "[EventFilter](#cfn-cognito-userpoolriskconfigurationattachment-compromisedcredentialsriskconfigurationtype-eventfilter)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-compromisedcredentialsriskconfigurationtype-syntax.yaml"></a>

```
  [Actions](#cfn-cognito-userpoolriskconfigurationattachment-compromisedcredentialsriskconfigurationtype-actions): 
    CompromisedCredentialsActionsType
  [EventFilter](#cfn-cognito-userpoolriskconfigurationattachment-compromisedcredentialsriskconfigurationtype-eventfilter): 
    - String
```

## Properties
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-compromisedcredentialsriskconfigurationtype-properties"></a>

`Actions`  <a name="cfn-cognito-userpoolriskconfigurationattachment-compromisedcredentialsriskconfigurationtype-actions"></a>
Settings for the actions that you want your user pool to take when Amazon Cognito detects compromised credentials.  
*Required*: Yes  
*Type*: [CompromisedCredentialsActionsType](aws-properties-cognito-userpoolriskconfigurationattachment-compromisedcredentialsactionstype.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EventFilter`  <a name="cfn-cognito-userpoolriskconfigurationattachment-compromisedcredentialsriskconfigurationtype-eventfilter"></a>
Settings for the sign-in activity where you want to configure compromised-credentials actions. Defaults to all events.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::UserPoolRiskConfigurationAttachment NotifyConfigurationType
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-notifyconfigurationtype"></a>

The configuration for Amazon SES email messages that advanced security features sends to a user when your adaptive authentication automated response has a *Notify* action.

## Syntax
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-notifyconfigurationtype-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-notifyconfigurationtype-syntax.json"></a>

```
{
  "[BlockEmail](#cfn-cognito-userpoolriskconfigurationattachment-notifyconfigurationtype-blockemail)" : NotifyEmailType,
  "[From](#cfn-cognito-userpoolriskconfigurationattachment-notifyconfigurationtype-from)" : String,
  "[MfaEmail](#cfn-cognito-userpoolriskconfigurationattachment-notifyconfigurationtype-mfaemail)" : NotifyEmailType,
  "[NoActionEmail](#cfn-cognito-userpoolriskconfigurationattachment-notifyconfigurationtype-noactionemail)" : NotifyEmailType,
  "[ReplyTo](#cfn-cognito-userpoolriskconfigurationattachment-notifyconfigurationtype-replyto)" : String,
  "[SourceArn](#cfn-cognito-userpoolriskconfigurationattachment-notifyconfigurationtype-sourcearn)" : String
}
```

### YAML
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-notifyconfigurationtype-syntax.yaml"></a>

```
  [BlockEmail](#cfn-cognito-userpoolriskconfigurationattachment-notifyconfigurationtype-blockemail): 
    NotifyEmailType
  [From](#cfn-cognito-userpoolriskconfigurationattachment-notifyconfigurationtype-from): String
  [MfaEmail](#cfn-cognito-userpoolriskconfigurationattachment-notifyconfigurationtype-mfaemail): 
    NotifyEmailType
  [NoActionEmail](#cfn-cognito-userpoolriskconfigurationattachment-notifyconfigurationtype-noactionemail): 
    NotifyEmailType
  [ReplyTo](#cfn-cognito-userpoolriskconfigurationattachment-notifyconfigurationtype-replyto): String
  [SourceArn](#cfn-cognito-userpoolriskconfigurationattachment-notifyconfigurationtype-sourcearn): String
```

## Properties
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-notifyconfigurationtype-properties"></a>

`BlockEmail`  <a name="cfn-cognito-userpoolriskconfigurationattachment-notifyconfigurationtype-blockemail"></a>
The template for the email message that your user pool sends when a detected risk event is blocked.  
*Required*: No  
*Type*: [NotifyEmailType](aws-properties-cognito-userpoolriskconfigurationattachment-notifyemailtype.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`From`  <a name="cfn-cognito-userpoolriskconfigurationattachment-notifyconfigurationtype-from"></a>
The email address that sends the email message. The address must be either individually verified with Amazon Simple Email Service, or from a domain that has been verified with Amazon SES.  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `131072`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MfaEmail`  <a name="cfn-cognito-userpoolriskconfigurationattachment-notifyconfigurationtype-mfaemail"></a>
The template for the email message that your user pool sends when MFA is challenged in response to a detected risk.  
*Required*: No  
*Type*: [NotifyEmailType](aws-properties-cognito-userpoolriskconfigurationattachment-notifyemailtype.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`NoActionEmail`  <a name="cfn-cognito-userpoolriskconfigurationattachment-notifyconfigurationtype-noactionemail"></a>
The template for the email message that your user pool sends when no action is taken in response to a detected risk.  
*Required*: No  
*Type*: [NotifyEmailType](aws-properties-cognito-userpoolriskconfigurationattachment-notifyemailtype.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ReplyTo`  <a name="cfn-cognito-userpoolriskconfigurationattachment-notifyconfigurationtype-replyto"></a>
The reply-to email address of an email template. Can be an email address in the format `admin@example.com` or `Administrator <admin@example.com>`.  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `131072`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SourceArn`  <a name="cfn-cognito-userpoolriskconfigurationattachment-notifyconfigurationtype-sourcearn"></a>
The Amazon Resource Name (ARN) of the identity that is associated with the sending authorization policy. This identity permits Amazon Cognito to send for the email address specified in the `From` parameter.  
*Required*: Yes  
*Type*: String  
*Pattern*: `arn:[\w+=/,.@-]+:[\w+=/,.@-]+:([\w+=/,.@-]*)?:[0-9]+:[\w+=/,.@-]+(:[\w+=/,.@-]+)?(:[\w+=/,.@-]+)?`  
*Minimum*: `20`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::UserPoolRiskConfigurationAttachment NotifyEmailType
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-notifyemailtype"></a>

The template for email messages that advanced security features sends to a user when your threat protection automated response has a *Notify* action.

## Syntax
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-notifyemailtype-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-notifyemailtype-syntax.json"></a>

```
{
  "[HtmlBody](#cfn-cognito-userpoolriskconfigurationattachment-notifyemailtype-htmlbody)" : String,
  "[Subject](#cfn-cognito-userpoolriskconfigurationattachment-notifyemailtype-subject)" : String,
  "[TextBody](#cfn-cognito-userpoolriskconfigurationattachment-notifyemailtype-textbody)" : String
}
```

### YAML
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-notifyemailtype-syntax.yaml"></a>

```
  [HtmlBody](#cfn-cognito-userpoolriskconfigurationattachment-notifyemailtype-htmlbody): String
  [Subject](#cfn-cognito-userpoolriskconfigurationattachment-notifyemailtype-subject): String
  [TextBody](#cfn-cognito-userpoolriskconfigurationattachment-notifyemailtype-textbody): String
```

## Properties
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-notifyemailtype-properties"></a>

`HtmlBody`  <a name="cfn-cognito-userpoolriskconfigurationattachment-notifyemailtype-htmlbody"></a>
The body of an email notification formatted in HTML. Choose an `HtmlBody` or a `TextBody` to send an HTML-formatted or plaintext message, respectively.  
*Required*: No  
*Type*: String  
*Pattern*: `[\p{L}\p{M}\p{S}\p{N}\p{P}\s*]+`  
*Minimum*: `6`  
*Maximum*: `20000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Subject`  <a name="cfn-cognito-userpoolriskconfigurationattachment-notifyemailtype-subject"></a>
The subject of the threat protection email notification.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[\p{L}\p{M}\p{S}\p{N}\p{P}\s]+`  
*Minimum*: `1`  
*Maximum*: `140`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TextBody`  <a name="cfn-cognito-userpoolriskconfigurationattachment-notifyemailtype-textbody"></a>
The body of an email notification formatted in plaintext. Choose an `HtmlBody` or a `TextBody` to send an HTML-formatted or plaintext message, respectively.  
*Required*: No  
*Type*: String  
*Pattern*: `[\p{L}\p{M}\p{S}\p{N}\p{P}\s*]+`  
*Minimum*: `6`  
*Maximum*: `20000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::UserPoolRiskConfigurationAttachment RiskExceptionConfigurationType
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-riskexceptionconfigurationtype"></a>

Exceptions to the risk evaluation configuration, including always-allow and always-block IP address ranges. 

## Syntax
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-riskexceptionconfigurationtype-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-riskexceptionconfigurationtype-syntax.json"></a>

```
{
  "[BlockedIPRangeList](#cfn-cognito-userpoolriskconfigurationattachment-riskexceptionconfigurationtype-blockediprangelist)" : [ String, ... ],
  "[SkippedIPRangeList](#cfn-cognito-userpoolriskconfigurationattachment-riskexceptionconfigurationtype-skippediprangelist)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-riskexceptionconfigurationtype-syntax.yaml"></a>

```
  [BlockedIPRangeList](#cfn-cognito-userpoolriskconfigurationattachment-riskexceptionconfigurationtype-blockediprangelist): 
    - String
  [SkippedIPRangeList](#cfn-cognito-userpoolriskconfigurationattachment-riskexceptionconfigurationtype-skippediprangelist): 
    - String
```

## Properties
<a name="aws-properties-cognito-userpoolriskconfigurationattachment-riskexceptionconfigurationtype-properties"></a>

`BlockedIPRangeList`  <a name="cfn-cognito-userpoolriskconfigurationattachment-riskexceptionconfigurationtype-blockediprangelist"></a>
An always-block IP address list. Overrides the risk decision and always blocks authentication requests. This parameter is displayed and set in CIDR notation.  
*Required*: No  
*Type*: Array of String  
*Maximum*: `200`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SkippedIPRangeList`  <a name="cfn-cognito-userpoolriskconfigurationattachment-riskexceptionconfigurationtype-skippediprangelist"></a>
An always-allow IP address list. Risk detection isn't performed on the IP addresses in this range list. This parameter is displayed and set in CIDR notation.  
*Required*: No  
*Type*: Array of String  
*Maximum*: `200`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Cognito::UserPoolUICustomizationAttachment
<a name="aws-resource-cognito-userpooluicustomizationattachment"></a>

A container for the UI customization information for the hosted UI in a user pool.

## Syntax
<a name="aws-resource-cognito-userpooluicustomizationattachment-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-cognito-userpooluicustomizationattachment-syntax.json"></a>

```
{
  "Type" : "AWS::Cognito::UserPoolUICustomizationAttachment",
  "Properties" : {
      "[ClientId](#cfn-cognito-userpooluicustomizationattachment-clientid)" : String,
      "[CSS](#cfn-cognito-userpooluicustomizationattachment-css)" : String,
      "[UserPoolId](#cfn-cognito-userpooluicustomizationattachment-userpoolid)" : String
    }
}
```

### YAML
<a name="aws-resource-cognito-userpooluicustomizationattachment-syntax.yaml"></a>

```
Type: AWS::Cognito::UserPoolUICustomizationAttachment
Properties:
  [ClientId](#cfn-cognito-userpooluicustomizationattachment-clientid): String
  [CSS](#cfn-cognito-userpooluicustomizationattachment-css): String
  [UserPoolId](#cfn-cognito-userpooluicustomizationattachment-userpoolid): String
```

## Properties
<a name="aws-resource-cognito-userpooluicustomizationattachment-properties"></a>

`ClientId`  <a name="cfn-cognito-userpooluicustomizationattachment-clientid"></a>
The app client ID for your UI customization. When this value isn't present, the customization applies to all user pool app clients that don't have client-level settings..  
*Required*: Yes  
*Type*: String  
*Pattern*: `[\w+]+`  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`CSS`  <a name="cfn-cognito-userpooluicustomizationattachment-css"></a>
A plaintext CSS file that contains the custom fields that you want to apply to your user pool or app client. To download a template, go to the Amazon Cognito console. Navigate to your user pool *App clients* tab, select *Login pages*, edit *Hosted UI (classic) style*, and select the link to `CSS template.css`.  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `131072`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`UserPoolId`  <a name="cfn-cognito-userpooluicustomizationattachment-userpoolid"></a>
The ID of the user pool where you want to apply branding to the classic hosted UI.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[\w-]+_[0-9a-zA-Z]+`  
*Minimum*: `1`  
*Maximum*: `55`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-cognito-userpooluicustomizationattachment-return-values"></a>

### Ref
<a name="aws-resource-cognito-userpooluicustomizationattachment-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the physicalResourceId, which is “UserPoolUICustomizationAttachment-UserPoolId-ClientId". For example:

 `{ "Ref": "UserPoolUICustomizationAttachment-us-east-1_FAKEPOOLID-2asc123fakeclientidajjulj6bh" }` 

For the Amazon Cognito user pool domain `UserPoolUICustomizationAttachment-us-east-1_FAKEPOOLID-2asc123fakeclientidajjulj6bh`, Ref returns the name of the UI customization attachment.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

## Examples
<a name="aws-resource-cognito-userpooluicustomizationattachment--examples"></a>



### Creating a new UI customization attachment for a user pool
<a name="aws-resource-cognito-userpooluicustomizationattachment--examples--Creating_a_new_UI_customization_attachment_for_a_user_pool"></a>

The following example sets UI customization settings in the referenced user pool and client.

#### JSON
<a name="aws-resource-cognito-userpooluicustomizationattachment--examples--Creating_a_new_UI_customization_attachment_for_a_user_pool--json"></a>

```
{
   "UserPoolUICustomization":{
      "Type":"AWS::Cognito::UserPoolUICustomizationAttachment",
      "Properties":{
         "UserPoolId":{
            "Ref":"UserPool"
         },
         "ClientId":{
            "Ref":"Client"
         },
         "CSS":".banner-customizable {\nbackground:
        linear-gradient(#9940B8, #C27BDB)\n}"
      }
   }
}
```

#### YAML
<a name="aws-resource-cognito-userpooluicustomizationattachment--examples--Creating_a_new_UI_customization_attachment_for_a_user_pool--yaml"></a>

```
UserPoolUICustomization: 
  Type: AWS::Cognito::UserPoolUICustomizationAttachment 
  Properties: 
    UserPoolId: !Ref UserPool
    ClientId: !Ref Client 
    CSS: ".banner-customizable { 
      background: linear-gradient(#9940B8, #C27BDB) 
    }"
```

# AWS::Cognito::UserPoolUser
<a name="aws-resource-cognito-userpooluser"></a>

The `AWS::Cognito::UserPoolUser` resource creates an Amazon Cognito user pool user.

## Syntax
<a name="aws-resource-cognito-userpooluser-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-cognito-userpooluser-syntax.json"></a>

```
{
  "Type" : "AWS::Cognito::UserPoolUser",
  "Properties" : {
      "[ClientMetadata](#cfn-cognito-userpooluser-clientmetadata)" : {Key: Value, ...},
      "[DesiredDeliveryMediums](#cfn-cognito-userpooluser-desireddeliverymediums)" : [ String, ... ],
      "[ForceAliasCreation](#cfn-cognito-userpooluser-forcealiascreation)" : Boolean,
      "[MessageAction](#cfn-cognito-userpooluser-messageaction)" : String,
      "[UserAttributes](#cfn-cognito-userpooluser-userattributes)" : [ AttributeType, ... ],
      "[Username](#cfn-cognito-userpooluser-username)" : String,
      "[UserPoolId](#cfn-cognito-userpooluser-userpoolid)" : String,
      "[ValidationData](#cfn-cognito-userpooluser-validationdata)" : [ AttributeType, ... ]
    }
}
```

### YAML
<a name="aws-resource-cognito-userpooluser-syntax.yaml"></a>

```
Type: AWS::Cognito::UserPoolUser
Properties:
  [ClientMetadata](#cfn-cognito-userpooluser-clientmetadata): 
    Key: Value
  [DesiredDeliveryMediums](#cfn-cognito-userpooluser-desireddeliverymediums): 
    - String
  [ForceAliasCreation](#cfn-cognito-userpooluser-forcealiascreation): Boolean
  [MessageAction](#cfn-cognito-userpooluser-messageaction): String
  [UserAttributes](#cfn-cognito-userpooluser-userattributes): 
    - AttributeType
  [Username](#cfn-cognito-userpooluser-username): String
  [UserPoolId](#cfn-cognito-userpooluser-userpoolid): String
  [ValidationData](#cfn-cognito-userpooluser-validationdata): 
    - AttributeType
```

## Properties
<a name="aws-resource-cognito-userpooluser-properties"></a>

`ClientMetadata`  <a name="cfn-cognito-userpooluser-clientmetadata"></a>
A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers. You create custom workflows by assigning AWS Lambda functions to user pool triggers.  
When Amazon Cognito invokes any of these functions, it passes a JSON payload, which the function receives as input. This payload contains a `clientMetadata` attribute that provides the data that you assigned to the ClientMetadata parameter in your request. In your function code, you can process the `clientMetadata` value to enhance your workflow for your specific needs.  
To review the Lambda trigger types that Amazon Cognito invokes at runtime with API requests, see [ Connecting API actions to Lambda triggers](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-working-with-lambda-triggers.html#lambda-triggers-by-event) in the *Amazon Cognito Developer Guide*.  
When you use the `ClientMetadata` parameter, note that Amazon Cognito won't do the following:  
+ Store the `ClientMetadata` value. This data is available only to AWS Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration doesn't include triggers, the `ClientMetadata` parameter serves no purpose.
+ Validate the `ClientMetadata` value.
+ Encrypt the `ClientMetadata` value. Don't send sensitive information in this parameter.
*Required*: No  
*Type*: Object of String  
*Pattern*: `^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DesiredDeliveryMediums`  <a name="cfn-cognito-userpooluser-desireddeliverymediums"></a>
Specify `EMAIL` if email will be used to send the welcome message. Specify `SMS` if the phone number will be used. The default value is `SMS`. You can specify more than one value.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ForceAliasCreation`  <a name="cfn-cognito-userpooluser-forcealiascreation"></a>
This parameter is used only if the `phone_number_verified` or `email_verified` attribute is set to `True`. Otherwise, it is ignored.  
If this parameter is set to `True` and the phone number or email address specified in the `UserAttributes` parameter already exists as an alias with a different user, this request migrates the alias from the previous user to the newly-created user. The previous user will no longer be able to log in using that alias.  
If this parameter is set to `False`, the API throws an `AliasExistsException` error if the alias already exists. The default value is `False`.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`MessageAction`  <a name="cfn-cognito-userpooluser-messageaction"></a>
Set to `RESEND` to resend the invitation message to a user that already exists, and to reset the temporary-password duration with a new temporary password. Set to `SUPPRESS` to suppress sending the message. You can specify only one value.  
*Required*: No  
*Type*: String  
*Allowed values*: `RESEND | SUPPRESS`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`UserAttributes`  <a name="cfn-cognito-userpooluser-userattributes"></a>
An array of name-value pairs that contain user attributes and attribute values to be set for the user to be created. You can create a user without specifying any attributes other than `Username`. However, any attributes that you specify as required (when creating a user pool or in the **Attributes** tab of the console) either you should supply (in your call to `AdminCreateUser`) or the user should supply (when they sign up in response to your welcome message).  
For custom attributes, you must prepend the `custom:` prefix to the attribute name.  
To send a message inviting the user to sign up, you must specify the user's email address or phone number. You can do this in your call to AdminCreateUser or in the **Users** tab of the Amazon Cognito console for managing your user pools.  
You must also provide an email address or phone number when you expect the user to do passwordless sign-in with an email or SMS OTP. These attributes must be provided when passwordless options are the only available, or when you don't submit a `TemporaryPassword`.  
In your call to `AdminCreateUser`, you can set the `email_verified` attribute to `True`, and you can set the `phone_number_verified` attribute to `True`.  
+ **email**: The email address of the user to whom the message that contains the code and username will be sent. Required if the `email_verified` attribute is set to `True`, or if `"EMAIL"` is specified in the `DesiredDeliveryMediums` parameter.
+ **phone\$1number**: The phone number of the user to whom the message that contains the code and username will be sent. Required if the `phone_number_verified` attribute is set to `True`, or if `"SMS"` is specified in the `DesiredDeliveryMediums` parameter.
*Required*: No  
*Type*: Array of [AttributeType](aws-properties-cognito-userpooluser-attributetype.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Username`  <a name="cfn-cognito-userpooluser-username"></a>
The value that you want to set as the username sign-in attribute. The following conditions apply to the username parameter.  
+ The username can't be a duplicate of another username in the same user pool.
+ You can't change the value of a username after you create it.
+ You can only provide a value if usernames are a valid sign-in attribute for your user pool. If your user pool only supports phone numbers or email addresses as sign-in attributes, Amazon Cognito automatically generates a username value. For more information, see [Customizing sign-in attributes](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-attributes.html#user-pool-settings-aliases).
*Required*: No  
*Type*: String  
*Pattern*: `[\p{L}\p{M}\p{S}\p{N}\p{P}]+`  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`UserPoolId`  <a name="cfn-cognito-userpooluser-userpoolid"></a>
The ID of the user pool where you want to create a user.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[\w-]+_[0-9a-zA-Z]+`  
*Minimum*: `1`  
*Maximum*: `55`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ValidationData`  <a name="cfn-cognito-userpooluser-validationdata"></a>
Temporary user attributes that contribute to the outcomes of your pre sign-up Lambda trigger. This set of key-value pairs are for custom validation of information that you collect from your users but don't need to retain.  
Your Lambda function can analyze this additional data and act on it. Your function can automatically confirm and verify select users or perform external API operations like logging user attributes and validation data to Amazon CloudWatch Logs.  
For more information about the pre sign-up Lambda trigger, see [Pre sign-up Lambda trigger](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-sign-up.html).  
*Required*: No  
*Type*: Array of [AttributeType](aws-properties-cognito-userpooluser-attributetype.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-cognito-userpooluser-return-values"></a>

### Ref
<a name="aws-resource-cognito-userpooluser-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the name of the user. For example: `admin`.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

## Examples
<a name="aws-resource-cognito-userpooluser--examples"></a>



### Creating a new user in a user pool
<a name="aws-resource-cognito-userpooluser--examples--Creating_a_new_user_in_a_user_pool"></a>

The following example creates a new user with the username testuser.

#### JSON
<a name="aws-resource-cognito-userpooluser--examples--Creating_a_new_user_in_a_user_pool--json"></a>

```
{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Description": "Provision a new user to an Amazon Cognito user pool\n",
    "Resources": {
        "TestUser": {
            "Properties": {
                "DesiredDeliveryMediums": [
                    "SMS"
                ],
                "MessageAction": "SUPPRESS",
                "UserAttributes": [
                    {
                        "Name": "name",
                        "Value": "John"
                    },
                    {
                        "Name": "phone_number",
                        "Value": "+12065551212"
                    },
                    {
                        "Name": "email",
                        "Value": "testuser@example.com"
                    }
                ],
                "Username": "testuser",
                "UserPoolId": "us-west-2_EXAMPLE"
            },
            "Type": "AWS::Cognito::UserPoolUser"
        }
    }
}
```

#### YAML
<a name="aws-resource-cognito-userpooluser--examples--Creating_a_new_user_in_a_user_pool--yaml"></a>

```
AWSTemplateFormatVersion: "2010-09-09"

Description: |
  Provision a new user to an Amazon Cognito user pool

Resources:
  TestUser:
    Type: AWS::Cognito::UserPoolUser
    Properties:
      DesiredDeliveryMediums:
        - SMS
      MessageAction: SUPPRESS
      UserAttributes:
        - Name: name
          Value: John
        - Name: phone_number
          Value: "+12065551212"
        - Name: email
          Value: testuser@example.com
      Username: testuser
      UserPoolId: us-west-2_EXAMPLE
```

# AWS::Cognito::UserPoolUser AttributeType
<a name="aws-properties-cognito-userpooluser-attributetype"></a>

The name and value of a user attribute.

## Syntax
<a name="aws-properties-cognito-userpooluser-attributetype-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-cognito-userpooluser-attributetype-syntax.json"></a>

```
{
  "[Name](#cfn-cognito-userpooluser-attributetype-name)" : String,
  "[Value](#cfn-cognito-userpooluser-attributetype-value)" : String
}
```

### YAML
<a name="aws-properties-cognito-userpooluser-attributetype-syntax.yaml"></a>

```
  [Name](#cfn-cognito-userpooluser-attributetype-name): String
  [Value](#cfn-cognito-userpooluser-attributetype-value): String
```

## Properties
<a name="aws-properties-cognito-userpooluser-attributetype-properties"></a>

`Name`  <a name="cfn-cognito-userpooluser-attributetype-name"></a>
The name of the attribute, for example `email` or `custom:department`.  
In some older user pools, the regex pattern for acceptable values of this parameter is `[\p{L}\p{M}\p{S}\p{N}\p{P}]+`. Older pools will eventually be updated to use the new pattern. Affected user pools are those created before May 2024 in US East (N. Virginia), US East (Ohio), US West (N. California), US West (Oregon), Asia Pacific (Mumbai), Asia Pacific (Tokyo), Asia Pacific (Seoul), Asia Pacific (Singapore), Asia Pacific (Sydney), Canada (Central), Europe (Frankfurt), Europe (Ireland), Europe (London), Europe (Paris), Europe (Stockholm), Middle East (Bahrain), and South America (São Paulo).   
*Required*: No  
*Type*: String  
*Pattern*: `[\p{L}\p{M}\p{S}\p{N}\p{P}\t\n\r ]+`  
*Minimum*: `1`  
*Maximum*: `32`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Value`  <a name="cfn-cognito-userpooluser-attributetype-value"></a>
The value of the attribute.  
*Required*: No  
*Type*: String  
*Maximum*: `2048`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::Cognito::UserPoolUserToGroupAttachment
<a name="aws-resource-cognito-userpoolusertogroupattachment"></a>

Adds a user to a group. A user who is in a group can present a preferred-role claim to an identity pool, and populates a `cognito:groups` claim to their access and identity tokens.

**Note**  
Amazon Cognito evaluates AWS Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you must use IAM credentials to authorize requests, and you must grant yourself the corresponding IAM permission in a policy.  
 [Signing AWS API Requests](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-signing.html) 
 [Using the Amazon Cognito user pools API and user pool endpoints](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pools-API-operations.html) 

## Syntax
<a name="aws-resource-cognito-userpoolusertogroupattachment-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-cognito-userpoolusertogroupattachment-syntax.json"></a>

```
{
  "Type" : "AWS::Cognito::UserPoolUserToGroupAttachment",
  "Properties" : {
      "[GroupName](#cfn-cognito-userpoolusertogroupattachment-groupname)" : String,
      "[Username](#cfn-cognito-userpoolusertogroupattachment-username)" : String,
      "[UserPoolId](#cfn-cognito-userpoolusertogroupattachment-userpoolid)" : String
    }
}
```

### YAML
<a name="aws-resource-cognito-userpoolusertogroupattachment-syntax.yaml"></a>

```
Type: AWS::Cognito::UserPoolUserToGroupAttachment
Properties:
  [GroupName](#cfn-cognito-userpoolusertogroupattachment-groupname): String
  [Username](#cfn-cognito-userpoolusertogroupattachment-username): String
  [UserPoolId](#cfn-cognito-userpoolusertogroupattachment-userpoolid): String
```

## Properties
<a name="aws-resource-cognito-userpoolusertogroupattachment-properties"></a>

`GroupName`  <a name="cfn-cognito-userpoolusertogroupattachment-groupname"></a>
The name of the group that you want to add your user to.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[\p{L}\p{M}\p{S}\p{N}\p{P}]+`  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Username`  <a name="cfn-cognito-userpoolusertogroupattachment-username"></a>
The user's username.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[\p{L}\p{M}\p{S}\p{N}\p{P}]+`  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`UserPoolId`  <a name="cfn-cognito-userpoolusertogroupattachment-userpoolid"></a>
The ID of the user pool that contains the group that you want to add the user to.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[\w-]+_[0-9a-zA-Z]+`  
*Minimum*: `1`  
*Maximum*: `55`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-cognito-userpoolusertogroupattachment-return-values"></a>

### Ref
<a name="aws-resource-cognito-userpoolusertogroupattachment-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns a generated ID, such as `UserToGroupAttachment-YejJvzrEXAMPLE`.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

## Examples
<a name="aws-resource-cognito-userpoolusertogroupattachment--examples"></a>



### Adding users to a group
<a name="aws-resource-cognito-userpoolusertogroupattachment--examples--Adding_users_to_a_group"></a>

The following template adds the users "testuser1" and "testuser2" to the user group "ExampleGroup" in the requested user pool.

#### JSON
<a name="aws-resource-cognito-userpoolusertogroupattachment--examples--Adding_users_to_a_group--json"></a>

```
{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Description": "Add a user to a group in an Amazon Cognito user pool\n",
    "Resources": {
        "TestUser2ToExampleGroup": {
            "Properties": {
                "GroupName": "ExampleGroup",
                "Username": "testuser1",
                "UserPoolId": "us-west-2_EXAMPLE"
            },
            "Type": "AWS::Cognito::UserPoolUserToGroupAttachment"
        },
        "TestUserToExampleGroup": {
            "Properties": {
                "GroupName": "ExampleGroup",
                "Username": "testuser2",
                "UserPoolId": "us-west-2_EXAMPLE"
            },
            "Type": "AWS::Cognito::UserPoolUserToGroupAttachment"
        }
    }
}
```

#### YAML
<a name="aws-resource-cognito-userpoolusertogroupattachment--examples--Adding_users_to_a_group--yaml"></a>

```
AWSTemplateFormatVersion: "2010-09-09"

Description: |
  Add a user to a group in an Amazon Cognito user pool

Resources:
  TestUser2ToExampleGroup:
    Type: AWS::Cognito::UserPoolUserToGroupAttachment
    Properties:
      GroupName: ExampleGroup
      Username: testuser1
      UserPoolId: us-west-2_EXAMPLE

  TestUserToExampleGroup:
    Type: AWS::Cognito::UserPoolUserToGroupAttachment
    Properties:
      GroupName: ExampleGroup
      Username: testuser2
      UserPoolId: us-west-2_EXAMPLE
```