I plan to use URLs (time limited) for private objects. Is there a way to set custom error pages for responses on 404/403 http?
Yes, maybe see this announcement . The Developer's Guide has a paragraph on user error support support, where I read the following sentence.
You can additionally provide a document with an error with a convenient error message and with additional Help. You provide this custom error document as part of adding a website configuration to your bucket. Amazon S3 returns your own error document only for the error class HTTP 4XX codes.
How to customize 4xx custom error page:
With CloudBerry, you can right-click the bucket, select Properties, click the Website tab, and set the index document and 4xx error document.
Use AWS Java SDK , here is sample code (not verified)
AmazonS3 client = new AmazonS3Client(new BasicAWSCredentials( "accessKey", "secretKey"); BucketWebsiteConfiguration conf = new BucketWebsiteConfiguration( "index.html", "404.html"); client.setBucketWebsiteConfiguration("bucketname.example.com", conf);
UPDATE I also found this blog post: Build your static website on Amazon S3 .