I am using aws elb for auto scaling my backend servers.
Right now I fetch my environment variables from .env file from the root of my project.
Every time I update the env variables I have to update the user config in the launch configuration of my auto scaling group.
Or if I am using an AMI I have to update the AMI. I want to know if there is a better way to do this.
I am using nodejs for my backend.
Thanks in advance.
Question posted in Amazon Web Sevices
The official Amazon Web Services documentation can be found here.
The official Amazon Web Services documentation can be found here.
2
Answers
The proper cloudian way of doing things would be to pull the variables at runtime from SSM Parameter Store or Secrets Manager (depending on the required scope of security management for the variables)
As per the comment, it is recommended to use environment variable from AWS SSM Parameter Store or AWS Secrets Manager.
Note: They both seem similar, however Secrets Manager has the ability to rotate the secrets.