I started to use the Swap Environment URLs feature in Elastic Beanstalk (CNAME swap). What is the best approach, if I want to stick to the same environment name?
Currently, I swap twice. First I bring up my changed my-env-new environment. I perform the first cname swap from my-env to my-env-new. Then I delete the previous my-env. I clone the new my-env-new into my-env and swap again. Is there a better way?
I run an AWS external CI/CD pipeline, which uses the environment name to update the environment, hence I need to retain that name. Maybe it's not a best practice to hardcode the environment name in such a pipeline.