Webflow Subdomain code implementation

The following query is not related to the platform but it is a query from a fellow developer.

Context: I am developing a feature exactly the same as in the designer where we can publish the webflow site then it becomes live on the web (at pear.webflowsites.com)
It is my guess the implementation for the feature we need to an A record to the domain provider website(Amazon 53, Namecheap) for the subdomain and upload the generated site html, css, js files to s3 bucket.
Question:
Is the above guess correct?
Which domain provider is used in webflow (Route 53/Namecheap)?
The documentation for doing adding the A record for the currently used domain provider?
If possible could you provide me the code snippet responsible for

  • adding subdomain record?
  • uploading of files to storage?

I know it will be an effort for you to answer my query but I would really appreciate it if you could take the time to answer them?
Thanks