





I need to run a specific command after the app is deployed but there is no relevant key under ebextensions for that purpose. The key “container_commands” is not giving this functionality, runs your command before the deploy, but there is a workaround:
1. Create your own script and place it under .ebextensions directory
2. Under container_commands, add the following lines (preferably in a separate config file):
container_commands:
01-command:
command: cp .ebextensions/001_pre_tomcat_start.sh /opt/elasticbeanstalk/hooks/appdeploy/post
02-command:
command: chmod 775 /opt/elasticbeanstalk/hooks/appdeploy/post/001_pre_tomcat_start.sh
That’s it!