'How to change an application name in AWS Elastic Beanstalk
I being struggling with the name of an application given that I had gave it a wrong name. Is there a way to change the application name ? if not what possible solution would you recommend me to do in this case.
Solution 1:[1]
You cannot change the name of an Elastic Beanstalk application. However, here is how I moved an environment to a new application. In the end you will have a new environment within a new application with an almost identical configuration as your existing environment and application.
The big steps are…
- Create your new application
- Clone your old environment into the new application
- Destroy your old application
We'll dig into each one below.
Prerequisites
To follow you these instructions you'll need to…
- Install and configure the AWS CLI
- Install and configure the Elastic Beanstalk CLI
Create your new application
Run aws elasticbeanstalk create-application --application-name my-new-application
Clone your old environment into the new application
- Save your old environment's config
eb config save - Find your config in
.elasticbeanstalk/saved_configs/<my config>.cfg.yml - Change
application_name: <old application name>to your new application name in.elasticbeanstalk/config.yml - Upload your config to the new environment using its name without the
.cfg.ymlextensioneb config put <config name> - Create your new environment
eb create <environment name> --cfg <config name>
Destroy your old application
When you're sure all is well with your new application, clean up your old application using this guide from Amazon.
Notes
- Make sure you turn on instance protection for your db before you destroy the old environment if you want to keep your data.
- If you run into trouble on the new server, take a look at the Elastic Beanstalk logs using
tail /var/log/eb-engine.logorcd /var/app/currentto look at your deployed app.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | KalebLape |
