title: How can I choose what configuration.php deploys AWS Elastic Beanstalk
body: <p>here is my situation:</p>
  
  <p>We have 2 environments deployed using AWS Elastic Beanstalk. One of them is the production environment, the other is for testing. The app is implemented with PHP and I want to differ between the production configuration.php and the development one. I have tried with the commands inside the .ebextensions folder. But when I want to copy the desired file from inside the machine it does not work:</p>
  
  <pre><code> getConfig:
      command: "sudo chmod 777 /var/app/current/configuration.php &amp;&amp; sudo rm /var/app/current/configuration.php &amp;&amp; sudo cp /home/webapp/configuration.php /var/app/current/" 
  </code></pre>
  
  <p>I got this in the <strong>cfn-init.log</strong>:</p>
  
  <pre><code>2016-10-14 09:23:37,749 [INFO] -----------------------Starting build-----------------------
  2016-10-14 09:23:37,838 [INFO] Running configSets: Infra-EmbeddedPostBuild
  2016-10-14 09:23:37,839 [INFO] Running configSet Infra-EmbeddedPostBuild
  2016-10-14 09:23:37,840 [INFO] Running config postbuild_0_#######
  2016-10-14 09:23:38,492 [INFO] Command cambioPermisos succeeded
  2016-10-14 09:23:39,003 [INFO] Command carpetaZips succeeded
  2016-10-14 09:23:39,459 [INFO] Command prueba succeeded
  2016-10-14 09:23:39,461 [INFO] ConfigSets completed
  2016-10-14 09:23:39,465 [INFO] -----------------------Build complete------------
  </code></pre>
  
  <hr>
  
  <p>When It seems that is ignoring the cp command. </p>
  
  <p>I have been reading a lot of AWS documentation and other StackOverlow questions, but all information I can find is related to AWS EB cofiguration files. Such us, setting the ammount of minimum instances.</p>
  
  <p>Any idea?</p>
  
  <p>Thanks in advance</p>