diff --git a/src/commands/add-cognito-user-pool-trigger.js b/src/commands/add-cognito-user-pool-trigger.js index 6ed3adf..7ef12bd 100644 --- a/src/commands/add-cognito-user-pool-trigger.js +++ b/src/commands/add-cognito-user-pool-trigger.js @@ -43,7 +43,7 @@ module.exports = function addCognitoUserPoolTrigger(options, optionalLogger) { /* cognito update requires the full config, not just a patch, but some attributes returned * from describeUserPool are not accepted back into the configuration, so they have to be removed */ - ['Id', 'Name', 'LastModifiedDate', 'CreationDate', 'SchemaAttributes', 'EstimatedNumberOfUsers', 'AliasAttributes', 'UsernameAttributes', 'Arn', 'Domain'].forEach(n => delete data[n]); + ['Id', 'Name', 'LastModifiedDate', 'CreationDate', 'SchemaAttributes', 'EstimatedNumberOfUsers', 'AliasAttributes', 'UsernameAttributes', 'Arn', 'Domain', 'UsernameConfiguration', 'CustomDomain'].forEach(n => delete data[n]); if (data.AdminCreateUserConfig && data.AdminCreateUserConfig.UnusedAccountValidityDays) { delete data.AdminCreateUserConfig.UnusedAccountValidityDays; }