create_dir_redirect_object

ltdconveyor.s3.create_dir_redirect_object(bucket_dir_path, bucket, metadata=None, acl=None, cache_control=None)

Create an S3 object representing a directory that’s designed to redirect a browser (via Fastly) to the index.html contained inside that directory.

Parameters:
bucket_dir_path : str

Full name of the object in the S3, which is equivalent to a POSIX directory path, like dir1/dir2.

bucket : boto3 Bucket instance

S3 bucket.

metadata : dict, optional

Header metadata values. These keys will appear in headers as x-amz-meta-*.

acl : str, optional

A pre-canned access control list. See https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl Default is None, meaning that no ACL is applied to the object.

cache_control : str, optional

The cache-control header value. For example, 'max-age=31536000'.