Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where to store images in Amazon AWS for use in RDS

I am currently creating a bunch of tables on the MySQL service in Amazon RDS. Several of the tables need to have image links in them. What I am trying to figure out, is where do I put the images? Do they go in RDS somewhere? or do i put them in S3 and link them to RDS? If the latter, how do I do that?

I have googled the heck out of this, with no conclusion so any assistance would be great.

like image 525
BattlFrog Avatar asked Jul 23 '11 16:07

BattlFrog


People also ask

Can we store images in RDS?

Uploading Data to a Amazon RDS MySQL Table. After creating the Amazon RDS database and a table in the database, you can get labels for your images and store those labels in the Amazon RDS database. Connect to your Amazon S3 bucket and retrieve the names of all the images in the bucket.

Where RDS snapshots are stored in AWS?

Amazon RDS DB snapshots and automated backups are stored in S3. You can use the AWS Management Console, the ModifyDBInstance API, or the modify-db-instance command to manage the period of time your automated backups are retained by modifying the RetentionPeriod parameter.

Where does AWS save images?

For storing static files like images AWS S3 is one of the best option. S3 is one of the cheapest cloud storage, you won't be charged for the number of times it's read, only amount of outbound traffic will bbe charged.

What storage service does AWS RDS use?

DB instances for Amazon RDS for MySQL, MariaDB, PostgreSQL, Oracle, and Microsoft SQL Server use Amazon Elastic Block Store (Amazon EBS) volumes for database and log storage. Depending on the amount of storage requested, Amazon RDS automatically stripes across multiple Amazon EBS volumes to enhance performance.


2 Answers

Depending on the image sizes, use cases, etc, I would probably store the images in S3.

You can store the S3 path as a database field. You can create a bucket as a domain name (ie, images.example.com), and point the CNAME to the bucket to get direct access to the images. You can also use the various S3 libraries to generate a time limited signed URL if you want to include security.

like image 149
Gary Richardson Avatar answered Sep 22 '22 12:09

Gary Richardson


You can either store them just as binary-data in a column in RDS or you can use S3. If you use S3 you store the http-url to the image in RDS and then get the image over http from S3.

like image 38
Yrlec Avatar answered Sep 21 '22 12:09

Yrlec