小编Z W*_*ang的帖子

如何在 Cloudformation 模板/CDK 中添加 AWS IoT 配置模板

我正在使用 Cloudformation 模板创建一个堆栈,包括 IoT 车队配置模板,并根据 文档,IoT 配置模板主体应该是字符串类型。

我有这样的物联网车队配置模板:

{
  "Parameters": {
    "SerialNumber": {
      "Type": "String"
    },  
    "AWS::IoT::Certificate::Id": {
      "Type": "String"
    }
  },
  "Resources": {
    "certificate": {
      "Properties": {
        "CertificateId": {
          "Ref": "AWS::IoT::Certificate::Id"
        },
        "Status": "Active"
      },
      "Type": "AWS::IoT::Certificate"
    },
    "policy": {
      "Properties": {
        "PolicyName": "mypolicy"
      },
      "Type": "AWS::IoT::Policy"
    },
    "thing": {
      "OverrideSettings": {
        "AttributePayload": "MERGE",
        "ThingGroups": "REPLACE",
        "ThingTypeName": "REPLACE"
      },
      "Properties": {
        "AttributePayload": {       
          "SerialNumber": {
            "Ref": "SerialNumber"
          }          
        },             
        "ThingName": {
          "Ref": "SerialNumber"
        }
      },
      "Type": "AWS::IoT::Thing"
    } …
Run Code Online (Sandbox Code Playgroud)

amazon-web-services aws-cloudformation iot

3
推荐指数
1
解决办法
494
查看次数