I have create EC2 instance(name: firstinstance) and install my application on it. Then I have created AMI image using the above instance Then I have created EC2 instance(name: secondinstance) from AMI image
But now I want to update the yml configuration file in EC2(secondinstance). I don't want to do it during creation of secondinstance using userdata. My AMI image automatically run the provided script after creation of EC2 instance using that Image. How can I do it?
I have tried setting the following in User data of firstinstance. It doesn't get created in secondinstance
touch /tmp/testfile.txt
Whenever anyone create the EC2 instance using AMI image, that instance should run the provided script after creation of that instance