Platform Hooks
Place scripts that you want hooks to trigger in one of the subfolders of the /opt/elasticbeanstalk/hooks/
folder.
Hooks are organized into the following folders:
preinit — Scripts run during instance bootstrapping.
appdeploy — Scripts run during an application deployment. Elastic Beanstalk performs an application deployment when new instances are launched and when a client initiates a new version deployment.
postinit — Scripts run after instance bootstrapping.
configdeploy — Scripts run when a client performs a configuration update that affects the software configuration on instance, for example, by setting environment properties or enabling log rotation to Amazon S3.
restartappserver — Scripts run when a client performs a restart app server operation.
Events
Deploy New Instance
Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/preinit.
Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/appdeploy/pre.
Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/appdeploy/enact.
Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/appdeploy/post.
Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/postinit.
Successfully execute hooks in directory /opt/elasticbeanstalk/addons/logpublish/hooks/config.
eb deploy
Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/appdeploy/pre.
Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/appdeploy/enact.
Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/appdeploy/post.
Successfully execute hooks in directory /opt/elasticbeanstalk/addons/logpublish/hooks/config.
Reconfigure Scaling
No hooks executed
Changing Environment Properties (eb setenv)
Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/configdeploy/pre.
Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/configdeploy/enact.
Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/configdeploy/post.
Successfully execute hooks in directory /opt/elasticbeanstalk/addons/logpublish/hooks/config
Restart App Server
Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/restartappserver/pre.
Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/restartappserver/enact.
Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/restartappserver/post.
Successfully execute hooks in directory /opt/elasticbeanstalk/addons/logpublish/hooks/config.