Okay, figured after a couple hours hammering my keyboard and abusing Google time to reach out for a lifeline.
Connecting to external MongoDb (Amazon VPC)
Setting up the service and roles.
In my service, I can create a role and connect no problem with:
mongodb://mymongousername:mymongopassword@52.21.228.198:27017/mymongodb
But when I try to enter Lookup Keys in the role to replace the mymongousername:mymongopassword I can no longer connect.
I set up my service like this:
mongodb://{m_username}:{m_password}@52.21.228.198:27017/mymongodb
and in my user role I set up
KEY: m_username VALUE: mymongousername PRVATE
KEY: m_password VALUE: mymongopassword PRIVATE
I get a response:
Unexpected MongoDb Service Exception:
Failed to connect to: 52.21.228.198:27017: SASL Authentication failed on database 'mymongodb': Authentication failed.
I tried variants of username/password curly brackets etc but no luck. I revert back to original service setup with mongodb://mymongousername:mymongopassword@52.21.228.198:27017/mymongodb
and connect again no problem.
Any help?