Skip to content

S3Client

S3Client(
    http_handler: BaseHandler | None = None,
    operation_interceptors: Iterable[Interceptor[Any, Any]] | None = None,
    retry_max_attempts: int | None = None,
    region: str | None = None,
    use_fips: bool | None = None,
    use_dual_stack: bool | None = None,
    endpoint: str | None = None,
    use_global_endpoint: bool | None = None,
    credentials: Credentials | None = None,
    credentials_provider: CredentialsProvider | None = None,
    anonymous: bool | None = None,
    force_path_style: bool | None = None,
    use_arn_region: bool | None = None,
    disable_multi_region_access_points: bool | None = None,
    accelerate: bool | None = None,
    disable_s3_express_session_auth: bool | None = None,
)

A client for the S3 service.

Parameters:

  • http_handler (BaseHandler | None, default: None ) –

    HTTP handler for sending requests. If not provided, creates a default handler.

  • operation_interceptors (Iterable[Interceptor[Any, Any]] | None, default: None ) –

    Interceptors that wrap every operation call. If not provided, defaults to an empty list.

  • retry_max_attempts (int | None, default: None ) –

    Maximum number of times to retry a failed operation. Defaults to 3.

  • region (str | None, default: None ) –

    The value of the AWS::Region endpoint parameter.

  • use_fips (bool | None, default: None ) –

    The value of the AWS::UseFIPS endpoint parameter.

  • use_dual_stack (bool | None, default: None ) –

    The value of the AWS::UseDualStack endpoint parameter.

  • endpoint (str | None, default: None ) –

    The value of the SDK::Endpoint endpoint parameter.

  • use_global_endpoint (bool | None, default: None ) –

    The value of the AWS::S3::UseGlobalEndpoint endpoint parameter.

  • credentials (Credentials | None, default: None ) –

    AWS credentials for request signing.

  • credentials_provider (CredentialsProvider | None, default: None ) –

    Provider that resolves AWS credentials. Takes precedence over credentials.

  • anonymous (bool | None, default: None ) –

    Send requests unsigned, without resolving credentials, even for operations that require authentication.

  • force_path_style (bool | None, default: None ) –

    Forces this client to use path-style addressing for buckets.

  • use_arn_region (bool | None, default: None ) –

    Enables this client to use an ARN's region when constructing an endpoint instead of the client's configured region.

  • disable_multi_region_access_points (bool | None, default: None ) –

    Disables this client's usage of Multi-Region Access Points.

  • accelerate (bool | None, default: None ) –

    Enables this client to use S3 Transfer Acceleration endpoints.

  • disable_s3_express_session_auth (bool | None, default: None ) –

    Disables this client's usage of Session Auth for S3Express buckets and reverts to using conventional SigV4 for those.