I am a beginner of AWS. I already know how to setup EC2, ELB, S3 and CF.
Now I have a question in my mind about how cloudfront request will be processed when an ELB with multiple instances (instance0 and instance1) set as Cloudfront origin.
Consider a request came to Cloudfront edge like following:
http://distributionId.cloudfront.net/profile_pic_1.png
For the first time, request goes to ELB. ELB passes the request to either instance0 or instance1. But "profile_pic_1.png" exist in only instance1. So in this situation is there any possibility to get 404 error from CF.
My Objective: I have to create an upload server. So there will be many instance of upload server behind an ELB. That ELB set as origin of CF. When user uploads a photo it will be saved temporarily in instance's storage with public access. When upload finishes I will provide cloudfront URL of the uploaded image to user. In this case will user get proper response from CF ?