Does QuickSight SDK support create template from scratch?

I want to create a QuichSight Template in a lambda function and hope to create if from scratch . When I call createTemplate function with Nodejs sdk like this:

const template = await quickSight.createTemplate({
          AwsAccountId: awsAccountID!,
          TemplateId: templateId,
          Name: `Event-Template-${event.ResourceProperties.Identifier}`,      
          Permissions: [{
            Principal: `arn:aws:quicksight:${region}:${awsAccountID}:user/${namespace}/${quickSightAccount}`,
            Actions: ['quicksight:DescribeTemplate'],
          Definition: {
            DataSetConfigurations: [
                Placeholder: 'event_cnt',
                DataSetSchema: {
                  ColumnSchemaList: [
                      Name: "event_name",
                      DataType: "string",
                      Name: "event_cnt",
                      DataType: "integer",
aws quicksight describe-template --aws-account-id xxxxxxxxxx --region us-east-1 --template-id Event-Template-data-analytics
    "Status": 200,
    "Template": {
        "Arn": "xxxxxxxxxxxxxxxxxx",
        "Name": "Event-Template-data-analytics",
        "Version": {
            "CreatedTime": "2023-04-10T10:12:28.289000+00:00",
            "Errors": [
                    "Type": "INTERNAL_FAILURE",
                    "Message": "An error occurred while processing the request"
            "VersionNumber": 1,
            "Status": "CREATION_FAILED",
            "Sheets": []
        "TemplateId": "Event-Template-data-analytics",
        "LastUpdatedTime": "2023-04-10T10:12:28.282000+00:00",
        "CreatedTime": "2023-04-10T10:12:28.282000+00:00"
    "RequestId": "b85d8750-29ad-4e0d-a589-94183de9d050"

I found the template is created but in “CREATION_FAILED” status (output of discribe-template commend )?

How to create a template from scratch? I have no Analysis or Dashboard to reference.

In order to create a template it needs to be referenced from an existing dashboard / analysis.

You could look to create a blank analysis / dashboard and use that.

Thanks. It can create from Definition parameter too. Definition can be export from describeTemplateDefinition API.