Using S3 storage for file uploads
Amazon Web Services (AWS) explains S3 as the storage for the internet that is designed to make web-scale computing easier for developers. S3 provides a very simple interface via web services; this makes storing and retrieving any amount of data very simple at any time from anywhere on the internet. Until now, in our catalog application, we saw that there were issues in managing the product images that were uploaded as a part of the creation process. This whole headache will go away if the images are stored somewhere globally and are easily accessible from anywhere. We will use S3 for the same purpose.
Getting ready
Amazon offers boto3, a complete Python library that interfaces with AWS via web services. Almost all of the AWS features can be controlled using boto3
. It can be installed using pip
:
$ pip install boto3
How to do it…
Now, make some changes to our existing catalog application to accommodate support for file upload and...