deployS3

Exports an async function that deploys our S3 bucket which holds our waiting rooms assets

Source:

(require("deployS3"))(region, bucketName, directoryPath) → {String}

Source:

Exports deployS3

Parameters:
Name Type Description
region String

A constant destructured from the CLI user's answers in deploy.js. Like "us-east-2".

bucketName String

Constant looks like beekeeper-${PROFILE_NAME}-s3

directoryPath String

Constant that is the path of the folder holding all S3 assets

Returns:

A manually constructed string that represents the public URL of the S3 Bucket.

Type
String

Methods

(async, inner) createBucket(s3, bucketName) → {String}

Source:

Function creates the S3 bucket

Parameters:
Name Type Description
s3 S3Client

Looks like new S3Client({ region })

bucketName String

Constant looks like beekeeper-${PROFILE_NAME}-s3

Returns:

Current implementation is not using this return value.

Type
String

(async, inner) uploadToS3(s3, bucketName, directoryPath, filePath)

Source:

Function uploads a given asset for the S3 bucket. This is called with a loop that iterates through every file in the directory holding the S3 assets.

Parameters:
Name Type Description
s3 S3Client

Looks like new S3Client({ region })

bucketName String

Constant looks like beekeeper-${PROFILE_NAME}-s3

directoryPath String

Constant that is the path of the folder holding all S3 assets

filePath String

The path of a given asset inside the S3 directory