hands-on lab

Configuring Redirects for a Static Website Hosted on Amazon S3

Intermediate
Up to 1h
114
5/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.

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:

Environment before

Environment after

About the author

Avatar
Jun Fritz, opens in a new tab
Cloud Labs Developer
Students
40,511
Labs
109
Courses
1
Learning paths
6

Jun is a Cloud Labs Developer with previous experience as a Software Engineer and Cloud Developer. He holds the AWS Certified Solutions Architect and DevOps Engineer Professional certifications. He also holds the AWS Certified Solutions Architect, Developer, and SysOps Administrator Associate certifications. 

Jun is focused on giving back to the growing cloud community by sharing his knowledge and experience with students and creating engaging content. 

Covered topics

Lab steps

Logging In to the Amazon Web Services Console
Redirecting Static Website Traffic to Another Amazon S3 Bucket
Handling Error Routing with Conditional Redirects