Skip to main content

Interface: S3Options

Amazon S3 options. AWS credentials are required, please see getting your credentials. Publishing requires choosing where they come from with awsCredentials source (there is no default):

  • source: "env" reads only the AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and optional AWS_SESSION_TOKEN environment variables (or custom names);
  • source: "profile" reads the named profile from the shared config and credentials files (static keys, IAM Identity Center / SSO, credential_process, assume-role with source_profile; credential_source, web identity and login_session are rejected).
  • source: "sso-role-chain" reads the named assume-role profile from the same files and resolves its source_profile chain, which must start at an IAM Identity Center (SSO) profile, with the configured files only.

No credentials are read implicitly: AWS_PROFILE, AWS_SDK_LOAD_CONFIG, AWS_CONFIG_FILE, AWS_SHARED_CREDENTIALS_FILE and the ~/.aws files are never consulted on their own.

Example configuration:

{
"build":
"publish": {
"provider": "s3",
"bucket": "bucket-name",
"awsCredentials": { "source": "env" }
}
}
}

Extends​

Properties​

accelerate?​

readonly optional accelerate?: boolean

If set to true, this will enable the s3 accelerated endpoint These endpoints have a particular format of: ${bucketname}.s3-accelerate.amazonaws.com


acl?​

readonly optional acl?: "private" | "public-read" | null

The ACL. Set to null to not add.

Please see required permissions for the S3 provider.

Default​

public-read

Overrides​

BaseS3Options.acl


awsCredentials?​

readonly optional awsCredentials?: S3AwsCredentialsOptions | null

Where the AWS credentials used for publishing come from. Required to publish (there is no default source); builds that don't publish don't need it. Build-time only: never written to app-update.yml.

Example using an IAM Identity Center (SSO) profile:

"awsCredentials": { "source": "profile", "profile": "release" }

Example assuming a role (role_arn + source_profile) on top of an SSO profile:

"awsCredentials": { "source": "sso-role-chain", "profile": "deploy", "configFile": "~/.aws/config" }

bucket​

readonly bucket: string

The bucket name.


channel?​

optional channel?: string | null

The update channel.

Default​

latest

Inherited from​

BaseS3Options.channel


encryption?​

readonly optional encryption?: "AES256" | "aws:kms" | null

Server-side encryption algorithm to use for the object.


endpoint?​

readonly optional endpoint?: string | null

The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like https://{service}.{region}.amazonaws.com.


forcePathStyle?​

readonly optional forcePathStyle?: boolean

When true, force a path-style endpoint to be used where the bucket name is part of the path. Path-style Access


path?​

readonly optional path?: string | null

The directory path.

Default​

/

Inherited from​

BaseS3Options.path


provider​

readonly provider: "s3"

The provider. Must be s3.

Overrides​

BaseS3Options.provider


publishAutoUpdate?​

readonly optional publishAutoUpdate?: boolean

Whether to publish auto update info files.

Auto update relies only on the first provider in the list (you can specify several publishers). Thus, probably, theres no need to upload the metadata files for the other configured providers. But by default will be uploaded. A provider with falsenever becomes the feed embedded inapp-update.yml` while a later provider receives the metadata: the first provider that does is embedded instead.

Default​

true

Inherited from​

BaseS3Options.publishAutoUpdate


region?​

optional region?: string | null

The region. Is determined and set automatically when publishing.


requestHeaders?​

readonly optional requestHeaders?: OutgoingHttpHeaders

Any custom request headers

Inherited from​

BaseS3Options.requestHeaders


storageClass?​

readonly optional storageClass?: "STANDARD" | "REDUCED_REDUNDANCY" | "STANDARD_IA" | null

The type of storage to use for the object.

Default​

STANDARD

timeout?​

readonly optional timeout?: number | null

Request timeout in milliseconds. (Default is 2 minutes; O is ignored)

Default​

120000

Inherited from​

BaseS3Options.timeout