Write an end-to-end code to migrate all my core AI application, associated databases (MongoDB and Postgres), and front end UI from one Azure environment to another using BASH or DMS or Python. Take care of all important aspects of migration. The response should be in all capital letters.
user