How to probe all running aws ec2 instances and their sec groups, etc to generate templates?
Terraform would be the best resource to create these EC2 instances repeatedly. 

I would highly recommend you to create a variables.tf or terraform.tfvars file template allowing you to create a new instance of these resources and store that file and the state file securely away for future management of the resources. A versioned S3 bucket would do quite well for this.

Please note that once you create your Terraform code you can instruct Terraform which state file(s) to work with, etc. Allowing you to reuse the same code over and over without duplication.