Copy Elastic Beanstalk Configuration across accounts

我怕爱的太早我们不能终老 提交于 2020-01-17 04:59:28

问题


If i use the eb-cli eb config save to save the configuration of my current environment it works to start a new one using eb create.

But if i want to create the same environment with a different AWS account obviously lines like the following make no sence:

aws:ec2:vpc:
    Subnets: subnet-2d9a3c56
    VPCId: vpc-1dff4c74

So how can i build the same elastic beanstalk environment within multiple accounts? Is there any way to tell AWS? Maybe an "Account Agnostic" config-save?


回答1:


It would not be possible to build the exact same ElasticBeanstalk environment across accounts. The environment is going to have resource IDs such as VPCs and Subnets that will be different.

A good way to build effectively the same ElasticBeanstalk application across multiple accounts would be to use CloudFormation to configure the environments. This requires a different approach to creating environments, but also means that the configuration can be more easily version controlled.




回答2:


With cloudformation you can specify the parameters to be selected to feed into the template when the stack is being created.

You can use the {"Ref" : ""} method to create drop down lists of Subnets in the VPC etc

This would be the way I would do it.



来源:https://stackoverflow.com/questions/34774380/copy-elastic-beanstalk-configuration-across-accounts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!