S3 support is built into Apache Hadoop [1]. Azure Blob Storage & OpenStack Swift are also included (see Hadoop Compatible File Systems section in the left sidebar). A properly provisioned NameNode can support hundreds of millions of blocks. Like any high performance system, it won't do this out of the box and does require some tuning based on your use case.
[1] http://hadoop.apache.org/docs/current/hadoop-aws/tools/hadoo...