Cloudformation Property validation failure: Encountered unsupported properties

Vie*_*iet 3 amazon-web-services aws-cloudformation amazon-cognito

I'm trying to create a nested stack with the root stack looks like this:

{
    "AWSTemplateFormatVersion": "2010-09-09",

    "Resources": {
        "DynamoDBTable": {
            "Type": "AWS::CloudFormation::Stack",
            "Properties": {
                "Parameters": {
                    "TableName": {
                        "Fn::Sub": "${AWS::StackName}"
                    }
                },
                "TemplateURL": "https://s3.amazonaws.com/my-templates-bucket/dynamodb.json"
            }
        },
        "S3WebsiteReact": {
            "Type": "AWS::CloudFormation::Stack",
            "Properties": {
                "Parameters": {
                    "BucketName": {
                        "Fn::Sub": "${AWS::StackName}-website"
                    }
                },
                "TemplateURL": "https://s3.amazonaws.com/my-templates-bucket/s3-static-website-react.json"
            }
        },
        "S3UploadBucket": {
            "Type": "AWS::CloudFormation::Stack",
            "Properties": {
                "Parameters": {
                    "BucketName": {
                        "Fn::Sub": "${AWS::StackName}-upload"
                    }
                },
                "TemplateURL": "https://s3.amazonaws.com/my-templates-bucket/s3-with-cors.json"
            }
        },
        "Cognito": {
            "Type": "AWS::CloudFormation::Stack",
            "DependsOn": "DynamoDBTable",
            "Properties": {
                "Parameters": {
                    "CognitoUserPoolName": {
                        "Fn::Join" : ["",
                            {
                                "Fn::Split": ["-", {
                                    "Ref": "AWS::StackName"
                                }]
                            }
                        ]
                    }
                },
                "TemplateURL": "https://s3.amazonaws.com/my-templates-bucket/cognito.json"
            }
        },
        "ApiGateway": {
            "Type": "AWS::CloudFormation::Stack",
            "DependsOn": ["DynamoDBTable", "Cognito"],
            "Properties": {
                "Parameters": {
                    "ApiGatewayName": {
                        "Fn::Sub": "${AWS::StackName}-api"
                    },
                    "CognitoUserPoolArn": {
                        "Fn::GetAtt": [ "Cognito", "Outputs.UserPoolArn" ]
                    },
                    "DynamoDBStack": {
                        "Fn::GetAtt": [ "DynamoDBTable", "Outputs.DDBStackName" ]
                    }
                },
                "TemplateURL": "https://s3.amazonaws.com/my-templates-bucket/api-gateway.json"
            }
        },
        "IdentityPool": {
            "Description": "Cognito Identity Pool. Must be created after User Pool and API Gateway.",
            "Type": "AWS::Cognito::IdentityPool",
            "DependsOn": ["Cognito", "ApiGateway", "S3UploadBucket"],
            "Properties": {
                "Parameters": {
                    "AppClientId": {
                        "Fn::GetAtt": [ "Cognito", "Outputs.AppClientId" ]
                    },
                    "UserPoolProviderName": {
                        "Fn::GetAtt": [ "Cognito", "Outputs.ProviderName" ]
                    },
                    "UserPoolName": {
                        "Fn::GetAtt": [ "Cognito", "Outputs.UserPoolName" ]
                    },
                    "UploadBucketName": {
                        "Fn::GetAtt": [ "S3UploadBucket", "Outputs.UploadBucketName" ]
                    },
                    "ApiGatewayId": {
                        "Fn::GetAtt": [ "ApiGateway", "Outputs.ApiGatewayId" ]
                    }
                },
                "TemplateURL": "https://s3.amazonaws.com/my-templates-bucket/identity-pool.json"
            }
        }
    },

    "Outputs": {

    }
}

Run Code Online (Sandbox Code Playgroud)

And I get this error:

{
    "AWSTemplateFormatVersion": "2010-09-09",

    "Resources": {
        "DynamoDBTable": {
            "Type": "AWS::CloudFormation::Stack",
            "Properties": {
                "Parameters": {
                    "TableName": {
                        "Fn::Sub": "${AWS::StackName}"
                    }
                },
                "TemplateURL": "https://s3.amazonaws.com/my-templates-bucket/dynamodb.json"
            }
        },
        "S3WebsiteReact": {
            "Type": "AWS::CloudFormation::Stack",
            "Properties": {
                "Parameters": {
                    "BucketName": {
                        "Fn::Sub": "${AWS::StackName}-website"
                    }
                },
                "TemplateURL": "https://s3.amazonaws.com/my-templates-bucket/s3-static-website-react.json"
            }
        },
        "S3UploadBucket": {
            "Type": "AWS::CloudFormation::Stack",
            "Properties": {
                "Parameters": {
                    "BucketName": {
                        "Fn::Sub": "${AWS::StackName}-upload"
                    }
                },
                "TemplateURL": "https://s3.amazonaws.com/my-templates-bucket/s3-with-cors.json"
            }
        },
        "Cognito": {
            "Type": "AWS::CloudFormation::Stack",
            "DependsOn": "DynamoDBTable",
            "Properties": {
                "Parameters": {
                    "CognitoUserPoolName": {
                        "Fn::Join" : ["",
                            {
                                "Fn::Split": ["-", {
                                    "Ref": "AWS::StackName"
                                }]
                            }
                        ]
                    }
                },
                "TemplateURL": "https://s3.amazonaws.com/my-templates-bucket/cognito.json"
            }
        },
        "ApiGateway": {
            "Type": "AWS::CloudFormation::Stack",
            "DependsOn": ["DynamoDBTable", "Cognito"],
            "Properties": {
                "Parameters": {
                    "ApiGatewayName": {
                        "Fn::Sub": "${AWS::StackName}-api"
                    },
                    "CognitoUserPoolArn": {
                        "Fn::GetAtt": [ "Cognito", "Outputs.UserPoolArn" ]
                    },
                    "DynamoDBStack": {
                        "Fn::GetAtt": [ "DynamoDBTable", "Outputs.DDBStackName" ]
                    }
                },
                "TemplateURL": "https://s3.amazonaws.com/my-templates-bucket/api-gateway.json"
            }
        },
        "IdentityPool": {
            "Description": "Cognito Identity Pool. Must be created after User Pool and API Gateway.",
            "Type": "AWS::Cognito::IdentityPool",
            "DependsOn": ["Cognito", "ApiGateway", "S3UploadBucket"],
            "Properties": {
                "Parameters": {
                    "AppClientId": {
                        "Fn::GetAtt": [ "Cognito", "Outputs.AppClientId" ]
                    },
                    "UserPoolProviderName": {
                        "Fn::GetAtt": [ "Cognito", "Outputs.ProviderName" ]
                    },
                    "UserPoolName": {
                        "Fn::GetAtt": [ "Cognito", "Outputs.UserPoolName" ]
                    },
                    "UploadBucketName": {
                        "Fn::GetAtt": [ "S3UploadBucket", "Outputs.UploadBucketName" ]
                    },
                    "ApiGatewayId": {
                        "Fn::GetAtt": [ "ApiGateway", "Outputs.ApiGatewayId" ]
                    }
                },
                "TemplateURL": "https://s3.amazonaws.com/my-templates-bucket/identity-pool.json"
            }
        }
    },

    "Outputs": {

    }
}

Run Code Online (Sandbox Code Playgroud)

It looks like my identity pool stack has some issues with the parameters. But the identity pool stack parameters look like this:

"Parameters" : {
        "AppClientId": {
            "Description": "ID of the App Client of the Cognito User Pool passed into this stack.",
            "Type": "String"
        },
        "UserPoolProviderName": {
            "Description": "Cognito User Pool Provider name passed into this stack.",
            "Type": "String"
        },
        "UserPoolName": {
            "Description": "Cognito User Pool Name passed into this stack.",
            "Type": "String"
        },
        "UploadBucketName": {
            "Description": "Name of the bucket that is used to upload files to.",
            "Type": "String"
        },
        "ApiGatewayId": {
            "Description": "ID of the API Gateway created for the stack.",
            "Type": "String"
        }
    },
Run Code Online (Sandbox Code Playgroud)

The funny thing is: I tried creating each stack on its own, then passed the outputs from them as parameters to the stacks that need those parameters and every single stack was created successfully without any problems.

I've tried to look for what is unsupported but was unable to find any answers.

404*_*404 5

错误:

[Encountered unsupported properties in {/}: [TemplateURL, Parameters]]
Run Code Online (Sandbox Code Playgroud)

说这两个属性不受支持。与模板中声明的所有其他资源也使用这两个属性不同,此资源是 a AWS::Cognito::IdentityPool,而其余资源都是type AWS::CloudFormation::Stack

这两个属性仅对AWS::CloudFormation::Stack类型有效,因此会出现验证错误。