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.
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.
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.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With