When launching a AWS EC2 instance, you can give a user data string that is interpreted either as key, value pairs with some configuration variables, or as a bash script, if it begins with a
We are using a third party software that needs a key, value pair to be given, but also we are configuring the machine at start time using a bash script. I added the key, value pair as an environment variable in the bash script using
export KEY=VALUE, but it does not seem to work and arrive to the third party program configuration.
I know that I could give the key, value pairs and then run the bash script using
ssh, but it is much harder, as I have to wait the instance to be ready to do it.
Has someone done this successfully?