--- title: "Amazon S3 rewrite rule limit" date: 2016-02-05 categories: ["Web"] source: https://andrew-jones.com/blog/amazon-s3-rewrite-rule-limit/ --- # Amazon S3 rewrite rule limit I'm in the process of moving this site to Amazon S3, rather than hosting it myself on a VPS. Should save me around $10 a month, but more importantly mean I wont have to look after a server. Furthermore, I could take advantage of the new [SSL support](https://aws.amazon.com/blogs/aws/new-aws-certificate-manager-deploy-ssltls-based-apps-on-aws/). Unfortunately over the years I've changed the structure of my site quite a lot, but I've tried my best to keep them working (everyone knows [cool URIs don't change](https://www.w3.org/Provider/Style/URI.html)). So much so, I have [automated tests](https://github.com/andrewrjones/andrew-jones.com-redirect-test) to ensure I keep old URIs working. So I need some way of setting up redirects. This all seemed fine when I found I could [configure redirects](http://docs.aws.amazon.com/AmazonS3/latest/dev/HowDoIWebsiteConfiguration.html), so I started on some scripts to convert my Nginx redirect rules to the XML format used by S3. But then when I try to upload them, I find S3 has a hard limit of 50 redirect rules... ![Screenshot of a web hosting configuration page showing a routing rule that redirects requests from "blog/tom-williams-and-the-boat-and-the-standard-lamps-at-the-waiting-room-stoke-newington-london" to "andrew-jones.com". The page highlights that 108 routing rules are provided, with a limit of 50, and includes options to save or cancel changes.](https://andrew-jones.com/images/posts/s3-rewrite-rule-limit.png) Not sure what to do now. Do I move to S3 and break many of my URIs? Or continue to host a static site on a VPS or similar?