How to run a command after deployment when using aws code pipeline BUT NOT aws code deploy


I have a node application that I need to depoy to Elastic Beanstalk. I am using Code Pipeline to run the build and to deploy to Beanstalk, but then I need to start (npm start) the node server.

How can I run the start command on Beanstalk after the code is deployed?

Please note I am not using Code Deploy, the pipeline is deploying directly to Banstalk. Or do I need to use it (Code Deploy)?

1 Answer


I'm not super familiar with Elastic Beanstalk. But if you are using containers, you should put the npm start command in the Entrypoint script when you build your image. If your run on EC2 it seems like .ebextensions is your answer.

Hope this points you in the right direction!

profile picture
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions