You launch the instance with "aws" CLI, passing it a user-data script (cloud config) that does all the things you describe with simple shell scripts. You install the app by copying it from an S3 location (build output), which is also defined in the script.
If you later want to port this into terraform, you can.
If you later want to port this into terraform, you can.