aws-cdk-lib.aws_s3.RedirectTarget

interface RedirectTarget

LanguageType name
.NETAmazon.CDK.AWS.S3.RedirectTarget
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awss3#RedirectTarget
Javasoftware.amazon.awscdk.services.s3.RedirectTarget
Pythonaws_cdk.aws_s3.RedirectTarget
TypeScript (source)aws-cdk-lib » aws_s3 » RedirectTarget

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

Example

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

Properties

NameTypeDescription
hostNamestringName of the host where requests are redirected.
protocol?RedirectProtocolProtocol to use when redirecting requests.

hostName

Type: string

Name of the host where requests are redirected.


protocol?

Type: RedirectProtocol (optional, default: The protocol used in the original request.)

Protocol to use when redirecting requests.