Anas
Anas

Reputation: 203

Copy elastic beanstalk configuration to an environment in another region

I have setup an elastic beanstalk application and environment using the AWS Web Console. Now I need to copy the configuration of this environment to another one in a different region. Is there any way to do that. Can anybody help me with a detailed documentation for that ?

Upvotes: 4

Views: 2560

Answers (1)

Anas
Anas

Reputation: 203

You can copy one elastic beanstalk environment configuration from a region to another in the following way.

I - Save an environment's configuration

1. Open the Elastic Beanstalk console
2. Navigate to the management page for your environment.
3. Choose Actions, and then choose Save Configuration.
4. Use the on-screen form to name the saved configuration. Optionally, provide a brief description, and add tag keys and values.
5. Choose Save.

II - Initialise the EB CLI with the environment in first region

III - Download saved configuration

1. You can download a configuration using the EB CLI eb config command, as shown in the following example.
        `eb config get NAME`        ; where NAME is the name of your saved configuration.

IV - Initialise the EB CLI with the environment in second region

V - Upload configuration file to elastic bean stalk environment in another region

1. You can upload a configuration file using following command.
        `eb config put filename`    ; where `filename` is the name of configuration file without the full path. 
                                        The filename must have the file extension .cfg.yml
    (Now you can see the configuration in `Saved configuration` in the second environment )

VI - Apply a saved configuration during environment creation (Elastic Beanstalk console)

1. Open the Elastic Beanstalk console.
2. Choose an application.
3. Choose Saved Configurations.
4. Choose a saved configuration, and then choose Launch environment.
5. Proceed through the wizard to create your environment.

Upvotes: 5

Related Questions