Configuring AWS Elastic Beanstalk Timezone for Auto Scaling

Question:

I have a single instance server deployed on AWS – Elastic Beanstalk that needs timezone configuration, and I changed the timezone as logging into the EC2 environment with ssh, and update it with the linux commands listed below;

Everything is fine as the server is running as a single instance. The problem arose as I wanted to use Auto Scaling, Load Balancing feature. On single instance, updating the timezone on linux AMI is fine, but on auto scaling mode, because that the instances are created/destroyed/recreated according to the threshold metrics, all the configuration is lost.

My simple question is, how can I change/configure the timezone for an auto scalable, load balancing mode in AWS Elastic Beanstalk ?

Answer:

you can configure the newly starting server with ebextensions.
Here’s an example that works for me. Add the following command into the file .ebextensions/timezone.config:

Leave a Reply