Since I asked this question about 5 months ago, I had some time to get some ideas; so I will answer myself:
From what I saw, there is no significant difference in performance . I can imagine that calling s3cmd
from PHP can be expensive due to an external process call for each request; but again, the Amazon SDK uses cURL to send requests, so the difference is not very big.
One difference I noticed is that the Amazon SDK tends to throw cURL exceptions (seemingly randomly and rarely), but s3cmd
doesn't crash at all. My scripts run on 10 thousand files, so I had to study these cURL exceptions diligently.
My theory is that cURL crashes when there is a communication conflict on the server (for example, when two processes try to use the same resource). I am working on a development server where sometimes several processes simultaneously process S3 using cURL; these are the only situations in which cURL exhibits this behavior.
Conclusion:
Using s3cmd
may be more stable, but using the SDK provides more flexibility and better PHP code integration with you; until you forget to handle rare cases (I would say 1 for every 1000 requests when several processes are running at the same time), in which the SDK throws a cURL exception.
source share