Suppose there are two buckets: one-bucket, another-bucket.
Show content in another bucket when the file is missing in one bucket:
<RoutingRules>
<RoutingRule>
<Condition>
<HttpErrorCodeReturnedEquals>403</HttpErrorCodeReturnedEquals >
</Condition>
<Redirect>
<HostName>another-bucket.s3.amazonaws.com</HostName>
</Redirect>
</RoutingRule>
</RoutingRules>
curl -v http://one-bucket.s3-website-ap-southeast-1.amazonaws.com/some-image.jpg
* Trying 52.219.40.46...
* Connected to one-bucket.s3-website-ap-southeast-1.amazonaws.com (52.219.40.46) port 80 (#0)
> GET /x7KJ/0.jpg HTTP/1.1
> Host: one-bucket.s3-website-ap-southeast-1.amazonaws.com
> User-Agent: curl/7.50.1
> Accept: */*
>
< HTTP/1.1 301 Moved Permanently
< x-amz-id-2: cox0/fIZ91JZTG9Sbrgt6Yx6hlJ9TqMR4UL5F18p3JSgGneS+1CcDgCTVD5A45l7YIDyPavpesU=
< x-amz-request-id: DB156A54006C616E
< Date: Tue, 28 Feb 2017 02:55:27 GMT
< Location: http://another-bucket.s3.amazonaws.com/some-image.jpg
< Content-Length: 0
< Server: AmazonS3
< Connection: close
<
* Closing connection 0