Security concerning MongoDB on ec2?
Should be secure enough. If I understand correctly, you don't have ports 27017 open to the world, i.e. you have (or should)block it thru your aws security group and perhaps your local firewall on the ec2 instance, then the only access to that port will be from calls originating on the same server.
Nothing is 100% secure, but I don't see any holes in what you have done.
I'm using a flask on an ec2 instance as server, and on that same machine I'm using that flask talking to a MongoDB. 
For the ec2 instance I only leaves port 80 and 22 open, without leaving the mongo port (27017) because all the clients are supposed to talk to the flask server via http calls. Only in the flask I have code to insert or query the server.
What I'm wondering is
Is it secure enough? I'm using a key file to ssh to that ec2 machine, but I do need to be 99% sure that nobody else could query/insert into the mongodb
If not, what shall I do?
Thanks!