Skip to content

@indiekit/store-s3

S3-compatible content store adaptor for Indiekit.

Installation

npm install @indiekit/store-s3

Requirements

A pair of S3-compatible API access and secret keys.

IMPORTANT

Store your API access and secret keys in environment variables called S3_ACCESS_KEY and S3_SECRET_KEY so that only you and the application can see them.

Usage

Add @indiekit/store-s3 to your list of plug-ins, specifying options as required:

json
{
  "plugins": ["@indiekit/store-s3"],
  "@indiekit/store-s3": {
    "region": "us-west",
    "endpoint": "https://s3-example-us-west-1.amazonaws.com",
    "bucket": "website"
  }
}

Options

OptionTypeDescription
accessKeystringYour S3 access key. Required, defaults to process.env.S3_ACCESS_KEY.
secretKeystringYour S3 secret key. Required, defaults to process.env.S3_SECRET_KEY.
regionstringYour S3 region name, for example "us-west". Required.
endpointstringYour S3 endpoint. Required.
bucketstringYour S3 bucket name. Required.