I want to serve my static/media contents ( images for now) from S3 but my url should be as it is now. For example:
http://example.com/resources/img/me.jpg is one of my current image url which is now being served from the native server (EBS storage came with EC2). Now I want to store this me.jpg file in a bucket of s3 and then if someone types the above url it is brought from there.
I know this is possible by creating a bucket name as example.com and www.example.com and then configuring Route 53 CNAME (Alias) for s3-website-region.amazonaws.com
But what will happen when I will type http://example.com/blog/cool-stuff-blog ? This not intended for a static/media content! It needs to execute server side code (Python/PHP).
But with the above configuration of my current working domain what's gonna happen? Won't it try to supply some content from S3 and fail?
How can I get it done? Please don't say have a subdomain like static.example.com and serve all static file requests to that. For me that's unacceptable now. I want to use the exact same domain name.