title: How to clone an AWS EB environment across platform branches
body: <p><strong>Background</strong></p>
  <p>Our AWS Elastic Beanstalk environment, running the latest <em>version</em> of the pre-configured &quot;Python 3.7 on 64-bit Amazon Linux 2&quot; platform <em>branch</em>, has a lot of custom configuration and environment properties.</p>
  <p>Now we would like to switch this environment to the &quot;Python <strong>3.8</strong> on 64-bit Amazon Linux 2&quot; platform <em>branch</em>.</p>
  <p>Basically, the goal is to clone the environment, keeping the current configuration (other than platform branch and version) and environment properties.</p>
  <p><strong>Problem</strong></p>
  <p>Unfortunately, when <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.managing.clone.html" rel="nofollow noreferrer">cloning</a>, it is <em>not</em> possible to switch between different platform <em>branches</em> (we can only switch between platform <em>versions</em> within the same platform <em>branch</em>).</p>
  <p>The <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.platform.upgrade.html#using-features.platform.upgrade.bluegreen" rel="nofollow noreferrer">documentation suggests</a> that a blue/green deployment is required here. However, a blue/green deployment involves creating a new environment from scratch, so we would still need some other way to copy our configuration settings and environment properties.</p>
  <p><strong>Question</strong></p>
  <p>What would be the recommended way to copy the configuration settings and/or environment properties from the original environment into a newly created environment?</p>
  <p>I suppose we could use <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb3-config.html" rel="nofollow noreferrer">eb config</a> to download the original configuration, modify the environment name, platform branch and version, and so on, and then use <code>eb config --update</code> on the new environment. However, that feels like a hack.</p>