Need automatic app restarts in Elastic BeanStalk after completing the deplyoment with using .platform

0

I’m currently working on a java project that will be deployed to elastic beanstalk and storing all the sensitive properties to parameter store. My problem is I need to restart the App server on elastic beanstalk after the deployment to get those parameters to work. I need that to be automatically picked up or automatically restart the app server.

Example: I need to store db access details in parameter store and make them available in environment properties in elastic beanstalk and I have done that by adding a bash script file in .platform folder to get the parameters and add them to env files /opt/elasticbeanstalk/deployment/env Enter image description here

Referenced link: https://www.fullstackerconsulting.com/2021/09/09/how-can-i-use-the-aws-systems-manager-parameter-store-with-an-aws-elastic-beanstalk-instance-to-manage-environment-variables/

Aws: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/platforms-linux-extend.html

For demo App, I'm using java to get the properties through “System.getenv("dbusername");” The scripts are running and I’m able to access the parameter store properties but the problem is I need to restart the App server on elastic beanstalk to work these properties.

Can you please someone suggest to me that I can run the App server automatically once the application is deployment is done?

Let me know if you need any further information related to my issue.

asked 2 years ago67 views
No Answers

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