Skip to content

Latest commit

 

History

History
66 lines (59 loc) · 2 KB

File metadata and controls

66 lines (59 loc) · 2 KB

Amazon S3 transport

Upload releases to S3 storage.

By default, it creates a new bucket named {app name}-updates if it doesn't exists. You can change it in a config.

If no accessKeyId and secretAccessKey options specified then values from ~/.aws/credentials will be used.

Configuration example:

package.json

{
  ...
  "updater": {
    "url": "https://example-updates.s3.amazonaws.com/{platform}-{arch}-{channel}.json"
  },
  ...
}

publisher.json

{
  "transport": {
    "module": "s3",
    "accessKeyId": "Your Access Key Id",
    "secretAccessKey": "Your Secret Access Key"
  }
}

Amazon S3 IAM Policy

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:CreateBucket", // Optional
                "s3:DeleteObject",
                "s3:GetObject",
                "s3:GetObjectVersion",
                "s3:ListBucket",
                "s3:PutObject",
                "s3:PutObjectAcl"
            ],
            "Resource": [
                "arn:aws:s3:::example-updates/*",
                "arn:aws:s3:::example-updates"
            ]
        }
    ]
}

Options

Name Default Description
accessKeyId AWS Access Key
secretAccessKey AWS Access Secret
bucket package.json:name + 'updates' Bucket name or config for s3.createBucket()
pathPrefix '' Prefix before each file name (e.g. downloads/)
aws {} AWS.config