We recently had a question about how Trimble Positions would work with data hosted on an Amazon EC2 instance of ArcGIS Server.
I gave this a test and there is a configuration that will work. However, it does require that you open up the database port (1433 for SQL Server) on your Amazon EC2 instance so that you can make a direct connection to the geodatabase from ArcCatalog. This configuration change can be done from the Amazon EC2 console. In theory you also need to open the port on the Windows Firewall on the actual instance, but if you used Esri’s Amazon Cloud Builder app, this is done for you. You’ll also need to login to your Amazon EC2 instance and configure a database user that you can use to connect to the geodatabase. I suppose you could do something with Windows authentication, but I didn’t look into it. In order to create the SQL user, I used SQL Server Management studio and added a login and password. For simplicity, I made this user part of the sysadmin server role, but you’d probably want to pick something more restrictive since this is somewhat exposed. I also mapped the login to a new user in the existing ‘egdb’ database on my EC2 instance. Here, again for simplicity, I made it part of the db_owner database role. This lets you use the dbo schema. I think you could probably also create a new, empty database to use for this, but I just used the existing egdb one.
Once you do this, you can treat it just like any other enterprise geodatabase (SDE) instance. You can copy data to it from ArcCatalog and can author a map document and include feature classes from it. When you analyze the data during publishing (being sure to select the mobile capability), you’ll have the option of registering the data source (prevents it from copying data to the server) which you’ll want to do. Once I published the service, I could browse it from the REST endpoint of my EC2 instance and could also create a mobile project in MPC. After creating the mobile project in MPC, I deployed it to a device, collected some data, and synchronized it through the service. I then opened up my map document (the one that references the SDE geodatabase on my EC2 instance) and used the Trimble Positions Desktop add-in admin window to open up the project that I had created in MPC. I then checked for new sessions and it brought in the one I had collected. I was able to work with the session and apply updates back to the Esri features. Although this workflow technically works, there are some significant caveats. For one, it’s not speedy as the latency of the connection noticeably affects ArcMap performance. It’s also not the most secure since your geodatabase (SQL) traffic isn’t encrypted. I did only open the SQL port to my subnet, but the traffic is still exposed.
In the future, the ‘right’ way to address this would likely be to have Trimble Positions Desktop add-in work directly against a hosted feature service and not require a direct geodatabase connection. It’s on our list.