Quicksight automation via cloudformation (IotAnalytics datasource)

0

Hi, i trying to automate QS with cloudformation and im stuck with datasource json template. the goal is create datasource which reference to aws iot analytics data set. I have tried everything without success.

below is mine template:

{
  "AWSTemplateFormatVersion": "2010-09-09",
  "Description": "--",
  "Parameters" : {
    "DataSetName" : {
      "Type" : "String",
      "Default" : "test_dataset",
      "Description" : "datasetName"
    }
  },
   "Resources": {
    "testQSdatasource": {
      "Type" : "AWS::QuickSight::DataSource",
      "Properties" : {
        "AwsAccountId" : {"Ref": "AWS::AccountId"},
        "DataSourceId" : "test_data_source_1",
        "Name" : "Analytics_data_source1",
        "Type" : "AWS_IOT_ANALYTICS",
        "DataSourceParameters": {
          "AwsIotAnalyticsParameters": {
            "DataSetName": {"Ref": "DataSetName"}
          }
        }
      }
    }
  }
}

i found also that docs not mentioned AwsIotAnalyticsParameters or anything similar that referenced to iot analytics. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-datasource-datasourceparameters.html

So is it even possible to create QS datasource which refer to iot analytics dataset?

2개 답변
0

Looks like we do not have IoT analytics supported in AWS::QuickSight::DataSource DataSourceParameters https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-datasource-datasourceparameters.html

One option could be to use CLI as referred here https://awscli.amazonaws.com/v2/documentation/api/latest/reference/quicksight/create-data-source.html. The ListDataSources has AWS_IOT_ANALYTICS in it and below

AwsIotAnalyticsParameters -> (structure)

The parameters for IoT Analytics.

DataSetName -> (string)

Dataset name.
profile pictureAWS
전문가
답변함 일 년 전
  • Hi AWS-User_Nitin , I did try to create datasource also via CLI with this code:

    aws quicksight create-data-source --aws-account-id "<my-account-id>" --data-source-id "test123" --name "test123" --type "AWS_IOT_ANALYTICS" --data-source-parameters '{"AwsIotAnalyticsParameters":{"DataSetName" : "test_30_day_dataset_dev"}}'
    

    but this also fails. Here is CLI response: An error occurred (InvalidParameterValueException) when calling the CreateDataSource operation: DataSourceParameters field is incorrectly set

0

up.. I also try to create datasource via CLI with this code:

aws quicksight create-data-source --aws-account-id "<my-account-id>" --data-source-id "test123" --name "test123" --type "AWS_IOT_ANALYTICS" --data-source-parameters '{"AwsIotAnalyticsParameters":{"DataSetName" : "test_30_day_dataset_dev"}}'

but this also fails. Here is CLI response: An error occurred (InvalidParameterValueException) when calling the CreateDataSource operation: DataSourceParameters field is incorrectly set

Does someone knows what may cause that error msg?

답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠