How to efficiently import many large JSON files directly from S3 into MongoDB
You don't need to store intermediate files, you can pipe the output of s3 file to stdout and you can get input to mongoimport
from stdin.
Your full command would look something like:
s3cmd get s3://<yourFilename> - | mongoimport -d <dbName> -c <collectionName>
note the -
which says send the file to stdout
rather than to a filename.