How to Access Amazon S3 in Python
Amazon Simple Storage Service (S3) is a low-cost & high-availability storage service provided by Amazon Web Services. It's really popular, more so due to the recent switching of IT infrastructures to cloud-based solutions. You can know more about Amazon S3, it's pricing structure etc. at http://aws.amazon.com/s3/
In this article we'll be looking at access/uploading files from/to the Amazon S3 service using Python.
Boto is a Python package which provides interfaces to various Amazon Web Services, one of them being S3. Let's start with installation of Boto package.
If you are running Debian-based systems, here the easy way:
If you need to install from source, that's also not very tough as Boto does not have any dependencies other than what already comes with Python. Run the following commands as root.
Boto provides a very simple and intuitive interface to Amazon S3, even a novice Python programmer and easily get himself acquainted with Boto for using Amazon S3. The following demo code will guide you through the operations in S3, like uploading files, fetching files, setting file ACLs/permissions, etc.
Well, that was working on Amazon S3 with Python in a nutshell. Hopefully this will help you.
|All times are GMT +5.5. The time now is 11:03.|