Amazon web services 尝试使用cloudformation创建用户池时出现验证错误
Im尝试使用aws cli读取json模板来创建cognito用户池 我运行这个命令Amazon web services 尝试使用cloudformation创建用户池时出现验证错误,amazon-web-services,Amazon Web Services,Im尝试使用aws cli读取json模板来创建cognito用户池 我运行这个命令 aws cloudformation validate-template --template-body file://userpool.json 这是json { "AdminCreateUserConfig": { "AllowAdminCreateUserOnly": false, "InviteMessageTemplate": { "EmailMessage": "
aws cloudformation validate-template --template-body file://userpool.json
这是json
{
"AdminCreateUserConfig": {
"AllowAdminCreateUserOnly": false,
"InviteMessageTemplate": {
"EmailMessage": "Caro portador, sua senha temporária para entrar no portal Cateno é {####} --- Número da solicitação {username}.",
"EmailSubject": "Portador: sua senha temporária",
"SMSMessage": "Portador: Sua senha temporária para entrar no portal Cateno é {####} --- Número da solicitação {username}."
},
"UnusedAccountValidityDays": 7
},
"AliasAttributes": [
"phone_number"
],
"AutoVerifiedAttributes": [
"phone_number"
],
"DeviceConfiguration": {
"ChallengeRequiredOnNewDevice": false,
"DeviceOnlyRememberedOnUserPrompt": false
},
"EmailConfiguration": {
"ReplyToEmailAddress": "",
"SourceArn": ""
},
"EmailVerificationMessage": "",
"EmailVerificationSubject": "",
"LambdaConfig": {
"CreateAuthChallenge": "",
"CustomMessage": "",
"DefineAuthChallenge": "",
"PostAuthentication": "",
"PostConfirmation": "",
"PreAuthentication": "",
"PreSignUp": "",
"PreTokenGeneration": "",
"UserMigration": "",
"VerifyAuthChallengeResponse": ""
},
"MfaConfiguration": "OFF",
"Policies": {
"PasswordPolicy": {
"MinimumLength": 6,
"RequireLowercase": true,
"RequireNumbers": true,
"RequireSymbols": true,
"RequireUppercase": true
}
},
"PoolName": "",
"Schema": [
{
"AttributeDataType": "String",
"DeveloperOnlyAttribute": true,
"Mutable": true,
"Name": "",
"NumberAttributeConstraints": {},
"Required": true,
"StringAttributeConstraints": {}
}
],
"SmsAuthenticationMessage": "",
"SmsConfiguration": {
"ExternalId": "",
"SnsCallerArn": ""
},
"SmsVerificationMessage": "",
"UserPoolAddOns": {
"AdvancedSecurityMode": "OFF"
},
"UserPoolTags": [
{
"key": "",
"value": ""
}
],
"UsernameAttributes": [
"email",
"name"
],
"VerificationMessageTemplate": {
"DefaultEmailOption": "CONFIRM_WITH_CODE",
"EmailMessage": "Caro portador, seu código de verificação é {####}",
"EmailMessageByLink": "",
"EmailSubject": "Portador: seu código de verificação",
"EmailSubjectByLink": "",
"SmsMessage": ""
}
}
但是我得到了这个错误
调用ValidateTemplate操作时出错(ValidationError):一个或多个模板属性无效[UserPoolTags、策略、VerificationMessageTemplate、MFA配置、架构、AdminCreateUserConfig、SmsAuthenticationMessage、SmsVerificationMessage、UserPoolAddOns、PoolName、EmailConfiguration、SmsConfiguration、AliasAttribute、EmailVerificationSubject、LambdaConfig、AutoVerifiedAttribute、DeviceConfiguration、EmailVerificationMessage、User名称属性]
我遗漏了什么?快速浏览一下-我认为
PoolName
应该是UserPoolName
:Aws cli默认区域设置为sa-east-1,不支持cognito…这里说的是PoolName