Configuring Redirects for a Static Website Hosted on Amazon S3
Description
A static website that is hosted on an Amazon S3 bucket uses client-side technologies such as HTML, CSS, and JavaScript in order to render static content to users. To access the static website, users can navigate to a custom domain that they've registered and configured using Amazon Route 53 or Amazon CloudFront, or by simply visiting the S3 bucket URL.
As the website continues to develop, it's important to provide a seamless transition for users as new designs and features come available. URL Redirection (or URL Forwarding) is a technique that allows you to redirect requests to a different URL. Your website and its users can benefit from redirects in the following instances:
- Rendering content that is stored in multiple locations
- Overriding default responses and displaying custom error pages
- Transitioning your website to a new domain or content source
With Amazon S3 website redirects, you can ensure the proper content is reaching your users while minimizing interruptions.
In this lab, you will configure two types of website redirects. In the first lab step, you will redirect traffic intended for one S3 bucket, to another S3 bucket that contains updated content. The second lab step will have you configure conditional redirects, a feature that allows you to define routing rules based on certain object keys or errors that users may encounter on your website.
Learning Objectives
Upon completion of this lab, you will be able to:
- Redirect static website requests from one Amazon S3 bucket to another bucket
- Configure conditional redirect rules based on S3 object keys and error codes
Intended Audience
- Cloud Architects
- Software Engineers
- DevOps Engineers
Prerequisites
Familiarity with the following will be beneficial but is not required:
- Amazon Simple Storage Service (S3)
If you need a refresher, refer to the following labs: