Hi all, I’m wondering what the best practice is for deploying and running scripts from your user-data script. I have a couple scripts that I currently build into an AMI, then I just run them from my user-data script, but I’m trying to move that out of the AMI. We use terraform to create the launch template with the user data script. The two options I see are
- Using the terraform template_file resource and rendering the scripts/files into the user-data script. Fine for smaller things but this can get ugly with larger scripts/files when rendeered into the user-data script
- Store the files/scripts in s3 and pull them down from there in the user-data script. That seems like the best option but then those scripts and files aren’t kept in version control… unless I have a separate project to store and upload them