question

JithinMV-2056 avatar image
0 Votes"
JithinMV-2056 asked JithinMV-2056 commented

How can I connect to MongoDB running in AWS ec2 instance as a source of Azure Data Migration Service (DMS).?

How can I know the IP address of DMS.? So that I can create an inbound rule in EC2 and allow port 27017 to that.

azure-cosmos-dbazure-database-migration
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @JithinMV-2056 Thank you for posting your question on Microsoft Q&A.

Please correct me if I am wrong here. Are you trying to migrate from MongoDB running in an AWS instance to Azure Mongo db using DMS service?.
There are 2 types of data Migration service Online and Offline.
1. You can use Azure Database Migration Service to perform an online Migration (minimal downtime) migration of databases from an on-premises or cloud instance of MongoDB to Azure Cosmos DB's API for MongoDB.
2. Use Azure Database Migration Service to perform an offline Migration, one-time migration of databases from an on-premises or cloud instance of MongoDB to the Azure Cosmos DB API for MongoDB.

During the Migration process you can see the IP address of the source server not the DMS (Please see image below).

142603-image.png

Regards,
Oury


0 Votes 0 ·
image.png (115.5 KiB)

1 Answer

SaurabhSharma-msft avatar image
0 Votes"
SaurabhSharma-msft answered JithinMV-2056 commented

Hi @jithinmv-2056,

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 -
142623-image.png
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.
142587-image.png

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.



image.png (34.2 KiB)
image.png (118.3 KiB)
image.png (117.8 KiB)
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @SaurabhSharma-msft

Thank you for this detailed explanation. I have already tried the second solution you mentioned. I created a public IP on the NIC associated with DMS. And I gave access for that IP in the AWS ec2 instance. But unfortunately that doesn't work. I think the only possible solutions for me are

  1. Open the port 27017 of my ec2 instance to ALL (But that we can't do because of security issues)

  2. Create a DMS service with a static Ip and allow that IP for the connection in EC2. Your first solution, ie. create a DMS service with ExpressRoute. I am not much aware of that. I mean how to do that thing. Can you please elaborate that. So that I can go in that way.

0 Votes 0 ·

Hi @jithinmv-2056,
I will check internally if there is any way other than Express route internally and get back to you.
Also, for ExpressRoute configuration please refer to the Create and modify an ExpressRoute circuit documentation. Also, refer to the Azure ExpressRoute pricing to know about the service charges.

Thanks
Saurabh


1 Vote 1 ·

Thank you

0 Votes 0 ·