Tim Anderson's ITWriting

Using Amazon's S3 Simple Storage Service with Delphi


Want to reproduce this article?

If you would like to reproduce this article on your own publication or web site, please contact Tim Anderson .

Amazon S3 and Delphi

Amazon publishes a number of code samples for using its S3 service - but Delphi is not one of them. This example application shows a possible approach.

In issue 247 and 249 of the UK Magazine PC Plus I wrote an article about how to use Amazon's remarkable S3 web storage service from Delphi.

Image of S3 example application

If you would like to read how it is put together, get the magazine. It is in several parts, running from issue 247 to 249 (not 248).

The latest code can be downloaded here. The code is for Delphi 2006 but can easily be adapted for earlier versions. I've included a compiled exe so non-coders can try it out. There are many improvements over the first version, including:

I'm also aware of at least one bug: the app fails if you try to upload a file that is in use. It would be easy to fix, and if there is interest I might work this up into a more user-friendly utility.

It depends on the Synapse internet library. Why not Indy? Well, I'm sure Indy can do the job easily, but I ran into some problems and found it hard to thread my way through the Indy site in order to find the latest stable download and documentation. I've been impressed so far with Synapse. Synapse is free, but If you use Synapse in a real project, please show your support by making a donation.

Important note

Please download the latest version of Synapse, as a problem with the earlier release requires a small amendment to the source code. The author of Synapse, Lukas Gebauer, kindly fixed the problem.


The December update fixes SSL (it works now) provided you have the openssl DLLs installed. I've included these in the download so you can run straight away.

Future improvements

If you are interested in helping to improve this application, let me know. I might also be persuaded to upload a Delphi 7 version; the code works just as well in the older Delphi.

Copyright © Tim Anderson 21 December 2006