Basically, we want to set the environment variable in the ubuntu based EC2 machine permanently so that the containers or other processes can fetch it.
1 Answer
You can connect to the EC2 instance and edit it in the environment file as mentioned below:-
sudo nano /etc/environment
#Write the name of the environment variable which you want to set in the below format
ENV_NAME="test"
#Close the file by Ctrl+x and execute the below command to reload the variables
source /etc/environment