【问题标题】:Using CodePipeline - deploy a CloudFormation stack to another account使用 CodePipeline - 将 CloudFormation 堆栈部署到另一个帐户
【发布时间】:2019-02-07 04:02:39
【问题描述】:

我正在帐户 00000000000 中配置 CodePipeline。

我想部署一个 CloudFormation 堆栈

  • 通过 CodePipeline 执行 CloudFromation 模板
  • 但不在帐户 123456789123 中,也不在 00000000000 中

问题

如何配置“部署”类型的 CodePipeline 操作来执行此操作?
特别是如何将其指向帐户 123456789123 ?

到目前为止我做了什么

我假设它通过角色工作。123456789123。

我在账户 123456789123 中创建了一个 IAM 角色,
信任帐户 00000000000,
信任服务 cloudformation。
我把它命名为arn:aws:iam::123456789123:role/CFDep

下面是我的 CodePipeline-Action 的配置。 我收到错误The role name is invalid. Check that the specified role exists and can be assumed by AWS CloudFormation. 为什么?

【问题讨论】:

    标签: amazon-cloudformation aws-codepipeline


    【解决方案1】:

    来自docs

    您不能使用 AWS CodePipeline 控制台创建或编辑 使用与另一个 AWS 账户关联的资源的管道。 但是,您可以使用控制台来创建 管道,然后使用 AWS CLI 编辑管道并添加 那些资源。或者,您可以使用 现有管道并手动向其中添加资源。

    您可以做以下 2 件事之一:

    1. 使用aws codepipeline cli 编辑管道

      aws codepipeline update-pipeline --cli-input-json file://pipeline.json

    2. 使用 cloudformation 创建管道本身

      您可以使用来自跨账户管道的 aws 参考架构中的 this pipeline definition 作为模板的起点。

    【讨论】:

      猜你喜欢
      • 2018-08-24
      • 2023-03-24
      • 2022-01-19
      • 1970-01-01
      • 2019-07-09
      • 2013-08-25
      • 1970-01-01
      • 2018-10-01
      • 2023-03-11
      相关资源
      最近更新 更多