We currently are moving our website to EC2 utilizing OpsWorks. Right now we reference all media files for the site with relative URL's in the coding... "/images/image1.jpg" and so on. Is there a way to alias the /images directory in our coding to utilize an S3 bucket? What we'd like to do is get big sized images out onto S3 so it's not stored withe each of our S3 instances.
I know we can create an alias DNS entry for the bucket itself, but then we'd have to reference that full URL inside of our coding. For instance, http://images.s3-website-us-east-1.amazonaws.com. We'd rather keep the URL referencing in the coding relative and an absolute path.
We are utilizing AWS Linux for the PHP/Apache front end EC2 instances.