AWS Batch: How to connect an EC2 or Fargate task to MongoDB

121 views Asked by At

I am still learning my way around AWS. I am trying to connect an AWS Batch(Fargate)job to MongoDB while it is running. I know that I need to use AWS privatelink between AWS and Mongo but from there I have tried finding a clear and concise way of establishing a connection.

I have tried creating my own vpc with the privatelink and internet gateway then tried configuring that Batch Job to the correct subnets but I still either a ServerSelectionTimeOut(i.e I'm not on the whitelist) and other times its Cannotpullcontainererror. I really am at a lost and I just need a clear heres how you do it from the ground up

0

There are 0 answers