【问题标题】:Create an RDS Opsworks Layer by a Cloudformation template通过 Cloudformation 模板创建 RDS Opsworks 层
【发布时间】:2017-05-12 13:49:36
【问题描述】:

我正在制作一个 CloudFormation 模板,用于创建 opsworks 堆栈、层和一些应用程序。在我的层中,我有 opsworks 层和 RDS 层。在AWS文档中,只有如何创建Opsworks::Layer,但我不知道如何制作Amazon RDS服务层:

{
  "Type": "AWS::OpsWorks::Layer",
  "Properties": {
    "Attributes" : { String:String },
    "AutoAssignElasticIps" : Boolean,
    "AutoAssignPublicIps" : Boolean,
    "CustomInstanceProfileArn" : String,
    "CustomJson" : JSON object,
    "CustomRecipes" : Recipes,
    "CustomSecurityGroupIds" :  [ String, ... ],
    "EnableAutoHealing" : Boolean,
    "InstallUpdatesOnBoot" : Boolean,
    "LifecycleEventConfiguration" : LifeCycleEventConfiguration,
    "LoadBasedAutoScaling" : LoadBasedAutoScaling,
    "Name" : String,
    "Packages" : [ String, ... ],
    "Shortname" : String,
    "StackId" : String,
    "Type" : String,
    "VolumeConfigurations" : [ VolumeConfiguration, ... ]
  }
}

我的目标是通过 cloudformation 自动创建我的 opsworks 资源。 知道怎么做吗? 谢谢

【问题讨论】:

    标签: json amazon-web-services amazon-rds amazon-cloudformation aws-opsworks


    【解决方案1】:

    了解有关 cfn-init 的更多信息是我最好的选择。希望this能帮到你

    【讨论】:

      【解决方案2】:

      很遗憾,根据Richard@AWS as of Dec 9 2015 的说法,将 RDS 实例注册为 OpsWorks 服务层的RegisterRdsDbInstance API 并未通过官方 CloudFormation 资源实现,也没有计划这样做。

      您可以联系 AWS 请求将其添加到他们的路线图中,但与此同时,您可以尝试以下一些替代方案:

      1. 从 CloudFormation 模板创建您的 RDS 实例和 OpsWorks 堆栈的其余部分,然后使用 AWS 控制台、AWS CLI 或任何其他平台的 AWS 开发工具包手动将 RDS 服务层附加到 OpsWorks 堆栈。
      2. 使用在 EC2 实例上运行的自我管理数据库实例层,使用 AWS::OpsWorks::Layerdb-masterType,如 AWS OpsWorks Template Snippet 中所述。
      3. 创建一个执行 RegisterRdsDbInstance API 调用的 Custom CloudFormation Resource,例如,使用 Lambda 函数和 NodeJS AWS 开发工具包。

      【讨论】:

      • 我尝试使用自定义资源,但收到错误无效服务令牌。知道为什么我会得到那个吗?一直被这个问题困扰一个月了,找不到任何帮助
      猜你喜欢
      • 2017-12-09
      • 2020-10-25
      • 2017-05-05
      • 2021-09-16
      • 2017-08-08
      • 2023-03-05
      • 2016-11-22
      • 1970-01-01
      • 2016-06-20
      相关资源
      最近更新 更多