I am unable to connect to mymongo d b

[nodemon] app crashed - waiting for file changes before starting…
[nodemon] restarting due to changes…
[nodemon] starting ts-node src/index.ts
Server is running port 3000
MongoServerSelectionError: connect ETIMEDOUT 13.247.31.128:27017
at Topology.selectServer (C:\Users\mbonanic.VF-ROOT\Desktop\Learn node\nodejsProject\swiggyCloneApp\node_modules\mongodb\src\sdam\topology.ts:610:30)
at async Topology._connect (C:\Users\mbonanic.VF-ROOT\Desktop\Learn node\nodejsProject\swiggyCloneApp\node_modules\mongodb\src\sdam\topology.ts:463:22)
at async Topology.connect (C:\Users\mbonanic.VF-ROOT\Desktop\Learn node\nodejsProject\swiggyCloneApp\node_modules\mongodb\src\sdam\topology.ts:410:7)
at async topologyConnect (C:\Users\mbonanic.VF-ROOT\Desktop\Learn node\nodejsProject\swiggyCloneApp\node_modules\mongodb\src\mongo_client.ts:553:9)
at async MongoClient._connect (C:\Users\mbonanic.VF-ROOT\Desktop\Learn node\nodejsProject\swiggyCloneApp\node_modules\mongodb\src\mongo_client.ts:565:7)
at async MongoClient.connect (C:\Users\mbonanic.VF-ROOT\Desktop\Learn node\nodejsProject\swiggyCloneApp\node_modules\mongodb\src\mongo_client.ts:477:7) {
reason: TopologyDescription {
type: ‘ReplicaSetNoPrimary’,
servers: Map(3) {
ac-ea20i22-shard-00-00.22sz8f4.mongodb.net:27017’ => [ServerDescription],
ac-ea20i22-shard-00-01.22sz8f4.mongodb.net:27017’ => [ServerDescription],
ac-ea20i22-shard-00-02.22sz8f4.mongodb.net:27017’ => [ServerDescription]
},
stale: false,
compatible: true,
heartbeatFrequencyMS: 10000,
localThresholdMS: 15,
setName: ‘atlas-72wji7-shard-0’,
maxElectionId: null,
maxSetVersion: null,
commonWireVersion: 0,
logicalSessionTimeoutMinutes: null
},
code: undefined,
[Symbol(errorLabels)]: Set(0) {},
[cause]: MongoNetworkError: connect ETIMEDOUT 13.247.31.128:27017
at connectionFailureError (C:\Users\mbonanic.VF-ROOT\Desktop\Learn node\nodejsProject\swiggyCloneApp\node_modules\mongodb\src\cmap\connect.ts:460:14)
at TLSSocket. (C:\Users\mbonanic.VF-ROOT\Desktop\Learn node\nodejsProject\swiggyCloneApp\node_modules\mongodb\src\cmap\connect.ts:362:38)
at Object.onceWrapper (node:events:634:26)
at TLSSocket.emit (node:events:519:28)
at TLSSocket.emit (node:domain:488:12)
at emitErrorNT (node:internal/streams/destroy:169:8)
at emitErrorCloseNT (node:internal/streams/destroy:128:3)
at processTicksAndRejections (node:internal/process/task_queues:82:21) {
[Symbol(errorLabels)]: Set(1) { ‘ResetPool’ },
[cause]: Error: connect ETIMEDOUT 13.247.31.128:27017
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1605:16) {
errno: -4039,
code: ‘ETIMEDOUT’,
syscall: ‘connect’,
address: ‘13.247.31.128’,
port: 27017
}
}
}

Probably your configuration does not allow access through any ip interface other than localhost.
See https://www.mongodb.com/docs/manual/core/security-mongodb-configuration/