Rentrop
Rentrop

Reputation: 21497

Copy Elastic Beanstalk Configuration across accounts

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?

Upvotes: 0

Views: 2849

Answers (2)

Paul Dunlop
Paul Dunlop

Reputation: 327

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.

Upvotes: 1

JaredHatfield
JaredHatfield

Reputation: 6661

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.

Upvotes: 3

Related Questions