Theme files on S3

Hello fellow Yii’ers. I might have a strange question for you.

We are building a Yii application that will be used by different customers, on different domains, using different config files. In those config files each environment will point to another theme for that specific customer.

We would like to put those themes on a secured S3 bucket on AWS. Is such a thing even possible?

Perhaps not with the Yii Themes but maybe with Smarty of Dwoo templates? And if it is possible how would such a thing work: we can only access a bucket via a url (or cloudfront) which would mean that we would read in the template, parse it somehow and then cache it.

Hope you can get me up to speed here :) Very much appreciate your thoughts on this matter. Thanks!