Skip to content

AWS::IoTAnalytics::Dataset creation throws InvalidRequestException

0

I've been trying to create an IoTAnalytics Dataset through CloudFormation, but it's throwing multiple strange errors.

At first I tried to create a Dataset with no RetentionPeriod, but this resulted in the following error:

Property validation failure: [The property {/RetentionPeriod/NumberOfDays} is required]

This is rather strange because I had configured the retention with

"Unlimited": true

Creating the Dataset without RetentionPeriod throws the following 400 exception: Invalid value of namespace's value : scheduledTime (Service: AWSIoTAnalytics; Status Code: 400; Error Code: InvalidRequestException; Request ID: e9e8b946-62cb-46ca-86fa-55c393ddf4f9) I can't find any CF reference to a property named "scheduledTime". Am I doing something wrong?

The redacted template I was trying to use is:

{
    "Type": "AWS::IoTAnalytics::Dataset",
    "Properties": {
        "DatasetName": "********",
        "Actions": [
            {
                "ActionName": "********",
                "QueryAction": {
                    "SqlQuery": "<secret>"
                }
            }
        ],
        "ContentDeliveryRules": [
            {
                "Destination": {
                    "S3DestinationConfiguration": {
                        "Bucket": {
                            "Ref": "OutputBucket"
                        },
                        "Key": "/********/!{iotanalytics:scheduledTime}/!{iotanalytics:versioned}.csv",
                        "RoleArn": {
                            "Fn::GetAtt": [
                                "IoTAnalyticsRole",
                                "Arn"
                            ]
                        }
                    }
                }
            }
        ],
        "Tags": [
            {
                "Key": "CostAlloc",
                "Value": "********"
            }
        ]
    },
    "Metadata": {
        "AWS::CloudFormation::Designer": {
            "id": "90f1a6df-655e-476a-90e9-148a3079fa23"
        }
    }
}
asked 6 years ago256 views
1 Answer
0

Hi Jelle
I had the same problem but then I noticed how this is suggested in the aws iot data console
/!{iotanalytics:scheduleTime}_!{iotanalytics:versionId}

scheduleTime and not scheduledTime
versionId and not versioned

Like with a whole lot more issues the api help and documentation is really poor and sometime even wrong.

@AWS: Please check the documentation regarding iotanalytics. It is already a lot trial and error to use aws services because the documentation is poor. But if the documentation is also wrong then it is really hard to use these services.
(If they ever read this)
Regards
Roland

answered 6 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.