1 Answer
- Newest
- Most votes
- Most comments
0
Hello.
It appears that there is a problem communicating from Fargate to Documentdb because a timeout error is being output.
Does DocumentDB's security group allow communication from Fargate?
The default port for DocumentDB is 27017.
I think you can check the security group used by DocumentDB by following the steps in the document below.
https://docs.aws.amazon.com/documentdb/latest/developerguide/db-cluster-view-details.html
Relevant content
- Accepted Answerasked 16 days ago
- AWS OFFICIALUpdated 6 days ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 2 years ago
For communicating from Fargate to Documentdb I added sg of documentdb in inbound rule of fargate sg like how we do for alb is it correct?
Thank you for your reply. You need to set Fargate's security group in the inbound rule of DocumentDB's security group.
@Riku_Kobayashi I have added sg of my fargate service in documentdb sg inbound but still getting error.
Have you checked the network ACL settings? Also, try launching EC2 in the subnet used by Fargate and see if you can access DocumentDB. If you can access it from the command line from EC2, it may not be a network problem. You may also need to check the code and task definitions you are using.
It is able to connect from ec2 via ssh tunneling and what I need to check in code and task definition?