AWS Lambda To Atlas

Damien

I want to connect my Lambda function to Mongo Atlas. It was all working fine but I needed to move my function inside a VPC so I could use redis.

Now I cannot connect to my database. I looked at the security group on the VPC and added the mongo db port but with no joy

Also - the mongo IP Whitelist is as follows for now 0.0.0.0/0 (includes your current IP address)

Is there anything else I should try?

Thank you

Wan Bachtiar

I needed to move my function inside a VPC so I could use redis.

If you are:

  • Using dedicated MongoDB Atlas instances (i.e. not shared instances M0, M2 and M5 clusters).

  • And, the MongoDB Atlas deployment is hosted on AWS

Then, you could follow this instruction to set up VPC peering connection.

Please note that MongoDB Atlas supports VPC peering with other AWS VPCs in the same region. AWS does not support cross-region VPC peering. For multi-region clusters, you must create VPC peering connections per-region.

See also the tutorial shown on: Introducing VPC peering to MongoDB Atlas

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事