5

我们有两个 AWS 账户,分别是 Dev 和 Prod。在 Dev 帐户中,我们的代码构建、代码管道和代码部署服务配置了 S3。但是,在 Prod 帐户中,一个自动缩放组正在为生产网站运行。根据我们的要求,我们希望通过跨账户部署将代码从 dev 账户部署到 Prod 账户。基本上,code-build 和 code-pipelines 将执行代码,并通过使用 code-deployment 将其部署在 Prod 帐户的 Auto-scaling 组中。

有人可以给我们一些关于实现相同目标的见解。

谢谢

4

2 回答 2

4

CodePipeline 支持跨账户操作,但目前无法通过控制台进行配置,需要配置一些额外的角色。

这是有关如何使其工作的指南:https ://docs.aws.amazon.com/codepipeline/latest/userguide/pipelines-create-cross-account.html

于 2018-07-31T18:04:03.530 回答
1

As of today, CodeDeploy doesn't support cross-account deployments. Depending on what your goal is, you might be able to achieve it another way.

I want to deploy a bundle in one account to another account

If your S3 bucket allows access to the second account, CodeDeploy doesn't care what account your bundle is in as long as everything can access it. Per @TimB, it looks like CodePipelines can support that behavior.

I need to initiate a deployment in one account to another

If you have a reason why the deployment must be in one account to another, you could set up the instances in the second account to be on-premise instances, though this is not a great solution.

于 2018-10-02T20:57:07.320 回答