How to Clone/Copy a mongodb database using mongodump on an AWS ECS server

Hello I have this problem regarding using mongodb dump. Kindly check out the full question on StackOverflow using this link. I will appreciate any help

https://stackoverflow.com/q/72136731/11080717