How do I transform a webdeploy package that has already been built (without deploying it with webdeploy)?

I have an (not core) running on elastic beanstalk deployed to several regions

I need to transform some settings in web.config that will be different for each region

I dont want to compile and package a different package for each region, this is just configuration so it would be very stupid to recompile and build many packages just to change config

I cant use webdeploy to deploy because im deploying through beanstalk

How do I transform the webconfig of an already packaged wedeploy package?

Source: StackOverflow