Skip to content
v2.274.0

RedirectTarget Struct ​

Specifies a redirect behavior of all requests to a website endpoint of a bucket.

Example ​

ts
const bucket = new s3.Bucket(this, 'MyRedirectedBucket', {
  websiteRedirect: { hostName: 'www.example.com' },
});

Properties ​

hostNamestringhost_namestrhostNameStringHostNamestringHostName*stringrequired#
Name of the host where requests are redirected.
protocoloptionalRedirectProtocolprotocoloptionalRedirectProtocolprotocoloptionalRedirectProtocolProtocoloptionalRedirectProtocolProtocoloptionalRedirectProtocol#
Protocol to use when redirecting requests.

Default: The protocol used in the original request.