如何选择configuration.php部署AWS EB

here is my situation:

We have 2 environments deployed using AWS EB. 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:

 getConfig:
    command: "sudo chmod 777 /var/app/current/configuration.php && sudo rm /var/app/current/configuration.php && sudo cp /home/webapp/configuration.php /var/app/current/" 

I got this in the cfn-init.log:

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------------

When It seems that is ignoring the cp command.

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.

Any idea?

Thanks in advance