Now with AWS also you can generate the template code from existing deployed resources and settings. Check IAC under CloudFormation section.