Quick Sight CDK is failing to create dataset from S3 datasource

I am trying to create Quicksight datasource and dataset through CDK. Datasource is getting properly however Dataset is failing with following error message. Any idea what may be causing it? I have a working CDK datasource and dataset. I followed same steps but it’s failing.

Resource handler returned message: “Invalid request provided: Invalid dataSetArn (Service: Quick Sight, Status Code: 400, Request ID: 8bcee979-95c9-4ffe-8212-b31ec3719572)” (RequestToken: 3ea9012f-2c96-c010-7b32-6d506017794c, HandlerErrorCode: InvalidRequest)

Hi @Sandiagee - Can you share the command for the creating the data source? Looks like there is an error on the command.

Tagging @eperts @Koushik_Muthanna as well for their quick expert advise.

Regards - Sanjeeb

Hi Sanjeeb, I am trying to create it via CDK. Here is cdk synth output getting created,

“GeneDXDataSource”: {
“Type”: “AWS::Quick Sight::DataSource”,
“Properties”: {
“AwsAccountId”: “############”,
“DataSourceId”: “GeneDXDS”,
“DataSourceParameters”: {
“S3Parameters”: {
“ManifestFileLocation”: {
“Bucket”: “XXXXXXXXXXXXXX”,
“Key”: “GeneDX/GeneDXReports.manifest”
}
}
},
“Name”: “GeneDXDSrc”,
“Permissions”: [
{
“Actions”: [
“quicksight:UpdateDataSourcePermissions”,
“quicksight:DescribeDataSourcePermissions”,
“quicksight:PassDataSource”,
“quicksight:DescribeDataSource”,
“quicksight:DeleteDataSource”,
“quicksight:UpdateDataSource”
],
“Principal”: “arn:aws:quicksight:us-east-1:$$$$$$$$$$$:user/default/Admin/$$$$$$$$$”
}
],
“Type”: “S3”
},
“Metadata”: {
“aws:cdk:path”: “EbresearchQSCdkStack/GeneDXDataSource”
}
},
“GeneDXDataSet”: {
“Type”: “AWS::Quick Sight::DataSet”,
“Properties”: {
“AwsAccountId”: “############”,
“ColumnGroups”: [
{
“GeoSpatialColumnGroup”: {
“Columns”: [
“Country”,
“City”,
“Zipcode”
],
“Name”: “Location”
}
}
],
“DataSetId”: “GeneDX Dataset”,
“ImportMode”: “SPICE”,
“LogicalTableMap”: {
“logicalTableMapKey”: {
“Alias”: “GenemicReports”,
“DataTransforms”: [
{
“CastColumnTypeOperation”: {
“ColumnName”: “Column-1”,
“NewColumnType”: “INTEGER”
}
},
{
“CastColumnTypeOperation”: {
“ColumnName”: “Age”,
“NewColumnType”: “INTEGER”
}
},
{
“TagColumnOperation”: {
“ColumnName”: “City”,
“Tags”: [
{
“ColumnGeographicRole”: “CITY”
}
]
}
},
{
“TagColumnOperation”: {
“ColumnName”: “Zipcode”,
“Tags”: [
{
“ColumnGeographicRole”: “POSTCODE”
}
]
}
},
{
“TagColumnOperation”: {
“ColumnName”: “Country”,
“Tags”: [
{
“ColumnGeographicRole”: “COUNTRY”
}
]
}
},
{
“FilterOperation”: {
“ConditionExpression”: “NOT ({Gene }=" ")”
}
},
{
“ProjectOperation”: {
“ProjectedColumns”: [
"Gene ",
"Disease(s) ",
"Mode of Inheritance ",
"Variant ",
"Classification ",
“Protein”,
“Gene Summary”,
“Condition”,
“Age”,
“Gender”,
“City”,
“Zipcode”,
“Country”
]
}
}
],
“Source”: {
“PhysicalTableId”: “GeneDXPM”
}
}
},
“Name”: “GeneDXDataSet”,
“Permissions”: [
{
“Actions”: [
“quicksight:DescribeDataSet”,
“quicksight:DescribeDataSetPermissions”,
“quicksight:PassDataSet”,
“quicksight:DescribeIngestion”,
“quicksight:ListIngestions”,
“quicksight:UpdateDataSet”,
“quicksight:DeleteDataSet”,
“quicksight:CreateIngestion”,
“quicksight:CancelIngestion”,
“quicksight:UpdateDataSetPermissions”
],
“Principal”: “arn:aws:quicksight:us-east-1:$$$$$$$$$$$$:user/default/Admin/$$$$$$$$$$$$$$”
}
],
“PhysicalTableMap”: {
“GeneDXPM”: {
“S3Source”: {
“DataSourceArn”: {
“Fn::GetAtt”: [
“GeneDXDataSource”,
“Arn”
]
},
“InputColumns”: [
{
“Name”: “Column-1”,
“Type”: “STRING”
},
{
“Name”: "Gene ",
“Type”: “STRING”
},
{
“Name”: "Disease(s) ",
“Type”: “STRING”
},
{
“Name”: "Mode of Inheritance ",
“Type”: “STRING”
},
{
“Name”: "Variant ",
“Type”: “STRING”
},
{
“Name”: "Classification ",
“Type”: “STRING”
},
{
“Name”: “Protein”,
“Type”: “STRING”
},
{
“Name”: “Gene Summary”,
“Type”: “STRING”
},
{
“Name”: “Condition”,
“Type”: “STRING”
},
{
“Name”: “Age”,
“Type”: “STRING”
},
{
“Name”: “Gender”,
“Type”: “STRING”
},
{
“Name”: “City”,
“Type”: “STRING”
},
{
“Name”: “Zipcode”,
“Type”: “STRING”
},
{
“Name”: “Country”,
“Type”: “STRING”
}
],
“UploadSettings”: {
“ContainsHeader”: true,
“Delimiter”: “,”,
“Format”: “CSV”,
“StartFromRow”: 1,
“TextQualifier”: “DOUBLE_QUOTE”
}
}
}
}
},
“Metadata”: {
“aws:cdk:path”: “EbresearchQSCdkStack/GeneDXDataSet”
}
},

The error is about the dataset arn not being correct. Check as part of your cdk process where dataset Arn value is being referenced.

Hi Team,

we have figured out issue. I was having value in dataSetId: with “Spaces”.
erroneous value dataSetId: "EB Research Main Dataset"
Correct Value dataSetId: "EBResearchMainDataset

Thanks Koushik for your help

Thank you @Sandiagee for sharing the details. Glad to here, the issue has been fixed.

Regards - Sanjeeb