Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Building Serverless Web Applications

You're reading from   Building Serverless Web Applications Develop scalable web apps using the Serverless Framework on AWS

Arrow left icon
Product type Paperback
Published in Jul 2017
Publisher Packt
ISBN-13 9781787126473
Length 354 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Diego Zanon Diego Zanon
Author Profile Icon Diego Zanon
Diego Zanon
Arrow right icon
View More author details
Toc

Amazon S3 (for media files)


S3 is not a database, it is only a storage system. It lacks a database engine and many storage features, but it can be pretty useful for saving media files such as photos, videos, and music.

This approach is already very popular. For example, if you develop an application that uses a MongoDB database, you could use MongoDB GridFS to store large binary data. However, the most efficient solution is to offload this kind of data to cloud services because the machines responsible for your database are usually the most expensive ones. It means that the cost per gigabyte in a database is usually higher than a cloud storage service, such as S3.

In our serverless store, we are storing the product images in SimpleDB/DynamoDB as string fields. Instead of saving the full binary data, we save just the URL of the image file. Example:

https://s3.amazonaws.com/serverless-store-media/product-images/lonely-bird.jpg

When we receive this information in the frontend, the <img> element...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime