Skip to main content

AwsS3StaticWebsiteServiceModuleSchema

AwsS3StaticWebsiteServiceModuleSchema is the input schema for the AwsS3StaticWebsiteServiceModule module: the bucket serving the website, and the local files it serves.

@group

Modules/Service/AwsS3StaticWebsiteService

@see

AwsS3StaticWebsiteServiceModule to learn more about the AwsS3StaticWebsiteServiceModule module.

Index

Properties

bucketName

bucketName: string

The bucket's name, unique across every AWS account: 3 to 63 lowercase letters, digits, dots and hyphens. The website is served at the bucket's website endpoint, which carries this name.

directoryPath

directoryPath: string

The local directory holding the website's files, relative to the project root. The bucket is kept in step with it: a new or changed file is uploaded, and a removed one is deleted from the bucket.

optionalfilter

filter?: (filePath: string) => boolean | null = null

A function choosing which files under the directory are uploaded: given a file's path, it returns true to upload it, e.g. to leave out .DS_Store. Only TypeScript can pass a function; octo.yaml cannot.

region

region: Region

The region the website bucket is created in, as produced by the AwsServerlessRegionModule module.

optionalsubDirectoryOrFilePath

subDirectoryOrFilePath?: string | null = null

One directory or file within directoryPath to upload instead of all of it. Its path is kept in its key: subdirectory/file.html uploads only that file, served at /subdirectory/file.html.

optionaltransform

transform?: (filePath: string) => string | null = null

A function giving each uploaded file its key in the bucket: given the file's path, it returns the key, e.g. to drop an .html extension. Only TypeScript can pass a function; octo.yaml cannot.