How do I programmatically use the S3FS module?
I used the following command to write the file. The system picks up the S3 connection (as I mentioned earlier that I'm able to store file as a field of a node):

file_put_contents('s3://Dir1/output.json', $jsonStr);