Response taking more time from server to server than local to server

Hi all,we are maintaining the our Neo4j server in the AWS instance... While we are hitting from our local machine to the remote Neo4j server which is in AWS instance taking 615ms,but when deployed my local code to remote AWS server pointing to the same AWS Neo4j instance taking 4190ms.. May i know? Can anyone help me with this?

bolt can be sensitive to roundtrip latency.

Which region is your AWS instance in? When it takes a long time, where is the code located? What is the round-trip network time (like ping your neo4j instance)

Pasting some code of what the client is doing that's taking so long would also be helpful.