The answer is NO. Amazon will not format your manuscript neither CreateSpace nor Kindle Direct Publishing. If you want to publish in Amazon for print on demand books, choose CreateSpace as a self-publishing platform. What you would do is format your manuscript and export it to PDF then that PDF file which conforms the CreateSpace requirements will be uploaded to their system together with your book cover.
If you want your book in eBook format, Kindle Direct Publishing is the right place for you. Again, KDP will not format your manuscript but they do convert your Microsoft Word document into mobi file. Mobi file is a format that can be read by Kindle device.
All formatting is done by the author himself or a book formatting service like The Fast Fingers.