Hi @Jithin M V ,
Thanks for using Microsoft Q&A !!
IP Address for data migration service is dynamic until you are using an ExpressRoute. If you are using an express route then you can identify the IP address by looking into Network interface associated with your Azure DMS instance. You can find that by looking under the resource group you have deployed your DMS instance. Your network interface resource will begin with NIC prefix followed by unique number and character sequence. Please check the below screenshot -
Once you select your NIC resource you could be able to see the IP address that needs to be included in your EC2 inbound rule.
If you are not using ExpressRoute, you can probably try adding a public IP Address to your NIC and try adding this public IP address to your EC2 inbound rule. Please check below screenshot for steps. I have not tested this myself but I believe this could help getting an IP for your DMS instance.
Please refer to the documentation which talks about knowing IP Address for Azure Database Migration Service.
Please let me know if any questions.
Thanks
Saurabh
----------
Please do not forget to "Accept the answer" wherever the information provided helps you to help others in the community.