Its something that you can do easily with the imperative API for CloudFormation plus the declarative description of the stacks in CloudFormation.