without creating a file on S3, can you write a string? I don't think you can't really do that. On Amazon S3, the only way to store data is using objects. But I found this when I was researching for the same. There is a simple way to do it with PHP, simply send the string as the body of the object, specifying the name of the new file in the key -
'Bucket' => [Bucket name],
'Key' => [path/to/file.ext],
'Body' => [Your string goes here],
'ContentType' => [specify mimetype if you want],
This will create a new file according to the specified key, which has content as specified in the string.