I need a away to see if an image exist on the S3 cloud, I'm build an APP to sort of merge data from local to the web, it is actually simple and I almost done, from the local app I'm getting a json post... so on that json I'm getting an image name "prety_image.jpg" which then is save to the DB, but before i save it I need to check if that image exist in the S3 cloud, I have the S3 url ... //foo.cloudfront.net/ and to display the image all I do is add the name of the image... for what I have seen is that if the image do exist it display the image.. but if the image doesn't exist I'm getting an xml file
<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>13A57760</RequestId>
<HostId>3/uj7Ro77bGnjzGZVABUXvVVg4=</HostId>
</Error>
so what I want is that if i'm getting this error then save a blank image if not then just save the image... but I don;t know how to do it... I haven't use aws sdk, i downloaded but I don't know what to do with it... I have use other SDK's but AWS SDK is just way to much for my brain..