AWS Cloudformation IoTAnalytics ServiceManagedS3 YAML

AWS Cloudformation IoTAnalytics ServiceManagedS3 YAML

我有一个这样的 AWS Cloudformation 模板(yaml 格式):

Datastore:
    Type: AWS::IoTAnalytics::Datastore
    Properties:
      DatastoreName: "DatastoreName"
      DatastoreStorage:
        ServiceManagedS3: ""
      RetentionPeriod:
        NumberOfDays: 7

我想定义一个 ServiceManagedS3-Bucket。官方文档 (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotanalytics-datastore-servicemanageds3.html) 说它应该只是一个空对象。但是当我像上面那样做时,我收到以下错误:Property validation failure: [Value of property {/DatastoreStorage/ServiceManagedS3} does not match type {Object}]。如果我像下面的 Cloudformation 一样更改为空行,则会抱怨空值。

      DatastoreStorage:
        ServiceManagedS3:
          
      RetentionPeriod:
        NumberOfDays: 7

我是不是使用了错误的 .yaml-Syntax 或者我在这里做错了什么?声明空对象的正确方法是什么?

根据评论。

ServiceManagedS3对象定义如下:

ServiceManagedS3: {}

因此,资源应该是:

Datastore:
    Type: AWS::IoTAnalytics::Datastore
    Properties:
      DatastoreName: "DatastoreName"
      DatastoreStorage:
        ServiceManagedS3: {}
      RetentionPeriod:
        NumberOfDays: 7