Skip to main content

risk_configurations

Creates, updates, deletes, gets or lists a risk_configurations resource.

Overview

Namerisk_configurations
TypeResource
Idaws.cognito_idp.risk_configurations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
account_takeover_risk_configurationobjectThe settings for automated responses and notification templates for adaptive authentication with threat protection.
client_idstringThe 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. (pattern: <code>[\w+]+</code>)
compromised_credentials_risk_configurationobjectSettings for compromised-credentials actions and authentication types with threat protection in full-function ENFORCED mode.
last_modified_datestring (date-time)The date and time when the item was modified. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a human-readable format like ISO 8601 or a Java Date object.
risk_exception_configurationobjectExceptions to the risk evaluation configuration, including always-allow and always-block IP address ranges.
user_pool_idstringThe ID of the user pool that has the risk configuration applied. (pattern: <code>[\w-]+_[0-9a-zA-Z]+</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_risk_configurationselectregionGiven an app client or user pool ID where threat protection is configured, describes the risk configuration. This operation returns details about adaptive authentication, compromised credentials, and IP-address allow- and denylists. For more information about threat protection, see Threat protection.
set_risk_configurationupdateregion, UserPoolIdConfigures threat protection for a user pool or app client. Sets configuration for the following. Responses to risks with adaptive authentication Responses to vulnerable passwords with compromised-credentials detection Notifications to users who have had risky activity detected IP-address denylist and allowlist To set the risk configuration for the user pool to defaults, send this request with only the UserPoolId parameter. To reset the threat protection settings of an app client to be inherited from the user pool, send UserPoolId and ClientId parameters only. To change threat protection to audit-only or off, update the value of UserPoolAddOns in an UpdateUserPool request. To activate this setting, your user pool must be on the Plus tier. In secondary regions for user pools with multi-region replication, only the SourceARN and From attributes of NotifyConfiguration can be modified to configure region-specific SES integration. All other risk configuration settings must match the existing values to maintain consistency across replicas.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Given an app client or user pool ID where threat protection is configured, describes the risk configuration. This operation returns details about adaptive authentication, compromised credentials, and IP-address allow- and denylists. For more information about threat protection, see Threat protection.

SELECT
account_takeover_risk_configuration,
client_id,
compromised_credentials_risk_configuration,
last_modified_date,
risk_exception_configuration,
user_pool_id
FROM aws.cognito_idp.risk_configurations
WHERE region = '{{ region }}' -- required
;

UPDATE examples

Configures threat protection for a user pool or app client. Sets configuration for the following. Responses to risks with adaptive authentication Responses to vulnerable passwords with compromised-credentials detection Notifications to users who have had risky activity detected IP-address denylist and allowlist To set the risk configuration for the user pool to defaults, send this request with only the UserPoolId parameter. To reset the threat protection settings of an app client to be inherited from the user pool, send UserPoolId and ClientId parameters only. To change threat protection to audit-only or off, update the value of UserPoolAddOns in an UpdateUserPool request. To activate this setting, your user pool must be on the Plus tier. In secondary regions for user pools with multi-region replication, only the SourceARN and From attributes of NotifyConfiguration can be modified to configure region-specific SES integration. All other risk configuration settings must match the existing values to maintain consistency across replicas.

UPDATE aws.cognito_idp.risk_configurations
SET
UserPoolId = '{{ UserPoolId }}',
ClientId = '{{ ClientId }}',
CompromisedCredentialsRiskConfiguration = '{{ CompromisedCredentialsRiskConfiguration }}',
AccountTakeoverRiskConfiguration = '{{ AccountTakeoverRiskConfiguration }}',
RiskExceptionConfiguration = '{{ RiskExceptionConfiguration }}'
WHERE
region = '{{ region }}' --required
AND UserPoolId = '{{ UserPoolId }}' --required
RETURNING
risk_configuration;