ts-lambda-api - v2.5.2
    Preparing search index...

    Interface S3ClientConfig

    The configuration interface of S3Client class constructor that set the region, credentials and other options.

    interface S3ClientConfig {
        apiVersion?: string;
        authSchemePreference?: string[] | Provider<string[]>;
        base64Decoder?: Decoder;
        base64Encoder?: Encoder;
        bodyLengthChecker?: BodyLengthCalculator;
        bucketEndpoint?: boolean;
        cacheMiddleware?: boolean;
        credentialDefaultProvider?: (input: any) => AwsCredentialIdentityProvider;
        credentials?: AwsCredentialIdentity | AwsCredentialIdentityProvider;
        customUserAgent?: string | UserAgent;
        defaultsMode?: DefaultsMode | Provider<DefaultsMode>;
        defaultUserAgentProvider?: Provider<UserAgent>;
        disableHostPrefix?: boolean;
        disableMultiregionAccessPoints?: boolean & (boolean | Provider<boolean>);
        disableS3ExpressSessionAuth?: boolean | Provider<boolean>;
        endpoint?: (
            | string
            | EndpointV2
            | Endpoint
            | Provider<Endpoint>
            | Provider<EndpointV2>
        ) & (
            | string
            | EndpointV2
            | Endpoint
            | Provider<Endpoint>
            | Provider<string>
            | Provider<EndpointV2>
        );
        endpointProvider?: (
            params: EndpointParameters,
            context?: { logger?: Logger },
        ) => EndpointV2;
        eventStreamSerdeProvider?: EventStreamSerdeProvider;
        extensions?: RuntimeExtension[];
        followRegionRedirects?: boolean;
        forcePathStyle?: boolean & (boolean | Provider<boolean>);
        getAwsChunkedEncodingStream?: GetAwsChunkedEncodingStream;
        httpAuthSchemeProvider?: S3HttpAuthSchemeProvider;
        httpAuthSchemes?: HttpAuthScheme[];
        logger?: Logger;
        maxAttempts?: number | Provider<number>;
        md5?: HashConstructor | ChecksumConstructor;
        profile?: string;
        region?: string | Provider<string>;
        requestChecksumCalculation?:
            | RequestChecksumCalculation
            | Provider<RequestChecksumCalculation>;
        requestHandler?: (
            | Record<string, unknown>
            | NodeHttpHandlerOptions
            | FetchHttpHandlerOptions
            | RequestHandler<any, any, HttpHandlerOptions>
        ) & HttpHandlerUserInput;
        requestStreamBufferSize?: number | false;
        responseChecksumValidation?:
            | ResponseChecksumValidation
            | Provider<ResponseChecksumValidation>;
        retryMode?: string | Provider<string>;
        retryStrategy?: RetryStrategy | RetryStrategyV2;
        runtime?: string;
        s3ExpressIdentityProvider?: S3ExpressIdentityProvider;
        sdkStreamMixin?: SdkStreamMixinInjector;
        serviceConfiguredEndpoint?: never;
        serviceId?: string;
        sha1?: HashConstructor | ChecksumConstructor;
        sha256?: HashConstructor | ChecksumConstructor;
        signer?:
            | RequestSigner
            | ((authScheme?: AuthScheme) => Promise<RequestSigner>);
        signerConstructor?: new (
            options: SignatureV4Init & SignatureV4CryptoInit,
        ) => RequestSigner;
        signingEscapePath?: boolean;
        signingRegion?: string;
        sigv4aSigningRegionSet?: string[] | Provider<string[]>;
        streamCollector?: StreamCollector;
        streamHasher?: StreamHasher<Readable> | StreamHasher<Blob>;
        systemClockOffset?: number;
        tls?: boolean;
        urlParser?: UrlParser;
        useAccelerateEndpoint?: boolean & (boolean | Provider<boolean>);
        useArnRegion?: boolean | Provider<boolean>;
        useDualstackEndpoint?: boolean | Provider<boolean>;
        useFipsEndpoint?: boolean | Provider<boolean>;
        useGlobalEndpoint?: boolean | Provider<boolean>;
        userAgentAppId?: string | Provider<string>;
        utf8Decoder?: Decoder;
        utf8Encoder?: Encoder;
    }

    Hierarchy (View Summary)

    Index

    Properties

    apiVersion?: string

    The API version set internally by the SDK, and is not planned to be used by customer code.

    authSchemePreference?: string[] | Provider<string[]>

    A comma-separated list of case-sensitive auth scheme names. An auth scheme name is a fully qualified auth scheme ID with the namespace prefix trimmed. For example, the auth scheme with ID aws.auth#sigv4 is named sigv4.

    base64Decoder?: Decoder

    The function that will be used to convert a base64-encoded string to a byte array.

    base64Encoder?: Encoder

    The function that will be used to convert binary data to a base64-encoded string.

    bodyLengthChecker?: BodyLengthCalculator

    A function that can calculate the length of a request body.

    bucketEndpoint?: boolean

    Whether to use the bucket name as the endpoint for this client.

    cacheMiddleware?: boolean

    Default false.

    When true, the client will only resolve the middleware stack once per Command class. This means modifying the middlewareStack of the command or client after requests have been made will not be recognized.

    Calling client.destroy() also clears this cache.

    Enable this only if needing the additional time saved (0-1ms per request) and not needing middleware modifications between requests.

    credentialDefaultProvider?: (input: any) => AwsCredentialIdentityProvider

    Default credentials provider; Not available in browser runtime.

    The credentials used to sign requests.

    customUserAgent?: string | UserAgent

    The custom user agent header that would be appended to default one

    The @smithy/smithy-client#DefaultsMode that will be used to determine how certain default configuration options are resolved in the SDK.

    defaultUserAgentProvider?: Provider<UserAgent>

    The provider populating default tracking information to be sent with user-agent, x-amz-user-agent header

    disableHostPrefix?: boolean

    Disable dynamically changing the endpoint of the client based on the hostPrefix trait of an operation.

    disableMultiregionAccessPoints?: boolean & (boolean | Provider<boolean>)

    Whether multi-region access points (MRAP) should be disabled.

    disableS3ExpressSessionAuth?: boolean | Provider<boolean>
    endpoint?: (
        | string
        | EndpointV2
        | Endpoint
        | Provider<Endpoint>
        | Provider<EndpointV2>
    ) & (
        | string
        | EndpointV2
        | Endpoint
        | Provider<Endpoint>
        | Provider<string>
        | Provider<EndpointV2>
    )

    The fully qualified endpoint of the webservice. This is only for using a custom endpoint (for example, when using a local version of S3).

    Endpoint transformations such as S3 applying a bucket to the hostname are still applicable to this custom endpoint.

    endpointProvider?: (
        params: EndpointParameters,
        context?: { logger?: Logger },
    ) => EndpointV2

    Providing a custom endpointProvider will override built-in transformations of the endpoint such as S3 adding the bucket name to the hostname, since they are part of the default endpointProvider.

    eventStreamSerdeProvider?: EventStreamSerdeProvider

    The function that provides necessary utilities for generating and parsing event stream

    extensions?: RuntimeExtension[]

    Optional extensions

    followRegionRedirects?: boolean

    This feature was previously called the S3 Global Client. This can result in additional latency as failed requests are retried with a corrected region when receiving a permanent redirect error with status 301. This feature should only be used as a last resort if you do not know the region of your bucket(s) ahead of time.

    forcePathStyle?: boolean & (boolean | Provider<boolean>)

    Whether to force path style URLs for S3 objects (e.g., https://s3.amazonaws.com// instead of https://.s3.amazonaws.com/

    getAwsChunkedEncodingStream?: GetAwsChunkedEncodingStream

    A function that returns Readable Stream which follows aws-chunked encoding stream.

    httpAuthSchemeProvider?: S3HttpAuthSchemeProvider

    Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use.

    httpAuthSchemes?: HttpAuthScheme[]

    Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.

    logger?: Logger

    Optional logger for logging debug/info/warn/error.

    maxAttempts?: number | Provider<number>

    Value for how many times a request will be made at most in case of retry.

    A constructor for a class implementing the __Checksum interface that computes MD5 hashes.

    profile?: string

    Setting a client profile is similar to setting a value for the AWS_PROFILE environment variable. Setting a profile on a client in code only affects the single client instance, unlike AWS_PROFILE.

    When set, and only for environments where an AWS configuration file exists, fields configurable by this file will be retrieved from the specified profile within that file. Conflicting code configuration and environment variables will still have higher priority.

    For client credential resolution that involves checking the AWS configuration file, the client's profile (this value) will be used unless a different profile is set in the credential provider options.

    region?: string | Provider<string>

    The AWS region to which this client will send requests

    requestChecksumCalculation?:
        | RequestChecksumCalculation
        | Provider<RequestChecksumCalculation>

    Determines when a checksum will be calculated for request payloads.

    requestHandler?: (
        | Record<string, unknown>
        | NodeHttpHandlerOptions
        | FetchHttpHandlerOptions
        | RequestHandler<any, any, HttpHandlerOptions>
    ) & HttpHandlerUserInput

    The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs.

    requestStreamBufferSize?: number | false

    Default 0 (off).

    When set to a value greater than or equal to 8192, sets the minimum number of bytes to buffer into a chunk when processing input streams with chunked encoding (that is, when request checksums are enabled). A minimum of 8kb = 8 * 1024 is required, and 64kb or higher is recommended.

    See https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-streaming.html.

    This has a slight performance penalty because it must wrap and buffer your input stream. You do not need to set this value if your stream already flows chunks of 8kb or greater.

    responseChecksumValidation?:
        | ResponseChecksumValidation
        | Provider<ResponseChecksumValidation>

    Determines when checksum validation will be performed on response payloads.

    retryMode?: string | Provider<string>

    Specifies which retry algorithm to use.

    retryStrategy?: RetryStrategy | RetryStrategyV2

    The strategy to retry the request. Using built-in exponential backoff strategy by default.

    runtime?: string

    The runtime environment.

    s3ExpressIdentityProvider?: S3ExpressIdentityProvider

    Identity provider for an S3 feature.

    sdkStreamMixin?: SdkStreamMixinInjector

    The internal function that inject utilities to runtime-specific stream to help users consume the data

    serviceConfiguredEndpoint?: never

    This field is used internally so you should not fill any value to this field.

    serviceId?: string

    Unique service identifier.

    A constructor for a class implementing the __Checksum interface that computes SHA1 hashes.

    A constructor for a class implementing the @smithy/types#ChecksumConstructor interface that computes the SHA-256 HMAC or checksum of a string or binary buffer.

    signer?: RequestSigner | ((authScheme?: AuthScheme) => Promise<RequestSigner>)

    The signer to use when signing requests.

    signerConstructor?: new (
        options: SignatureV4Init & SignatureV4CryptoInit,
    ) => RequestSigner

    The injectable SigV4-compatible signer class constructor. If not supplied, regular SignatureV4 constructor will be used.

    signingEscapePath?: boolean

    Whether to escape request path when signing the request.

    signingRegion?: string

    The region where you want to sign your request against. This can be different to the region in the endpoint.

    sigv4aSigningRegionSet?: string[] | Provider<string[]>

    This option will override the AWS sigv4a signing regionSet from any other source.

    The lookup order is:

    1. this value
    2. configuration file value of sigv4a_signing_region_set.
    3. environment value of AWS_SIGV4A_SIGNING_REGION_SET.
    4. signingRegionSet given by endpoint resolution.
    5. the singular region of the SDK client.
    streamCollector?: StreamCollector

    A function that converts a stream into an array of bytes.

    streamHasher?: StreamHasher<Readable> | StreamHasher<Blob>

    A function that, given a hash constructor and a stream, calculates the hash of the streamed value.

    systemClockOffset?: number

    An offset value in milliseconds to apply to all signing times.

    tls?: boolean

    Whether TLS is enabled for requests.

    urlParser?: UrlParser

    The function that will be used to convert strings into HTTP endpoints.

    useAccelerateEndpoint?: boolean & (boolean | Provider<boolean>)

    Whether to use the S3 Transfer Acceleration endpoint by default

    useArnRegion?: boolean | Provider<boolean>

    Whether to override the request region with the region inferred from requested resource's ARN. Defaults to undefined.

    useDualstackEndpoint?: boolean | Provider<boolean>

    Enables IPv6/IPv4 dualstack endpoint.

    useFipsEndpoint?: boolean | Provider<boolean>

    Enables FIPS compatible endpoints.

    useGlobalEndpoint?: boolean | Provider<boolean>
    userAgentAppId?: string | Provider<string>

    The application ID used to identify the application.

    utf8Decoder?: Decoder

    The function that will be used to convert a UTF8-encoded string to a byte array.

    utf8Encoder?: Encoder

    The function that will be used to convert binary data to a UTF-8 encoded string.