Instance A (MongoDB):

  • Subnet ID: subnet-1abcdef2
    • CIDR 10.0.5.0/24
  • VPC ID: vpc-3a456b7c
  • Private IP: 10.0.5.158
  • Security Group: TCP Port (27017)
    • 34.102.207.234/32
    • sg-1dde247a (default)

Instance B:

  • Subnet ID: subnet-1abcdef2
    • CIDR 10.0.5.0/24
  • VPC ID: vpc-3a456b7c
  • Private IP: 10.0.5.98
  • Security Group:
    • sg-1dde247a (default)

You want to access the MongoDB instance from your application running on Instance B.