S3Client#
Auto-generated documentation for S3 type annotations stubs module types-boto3-s3.
S3Client#
Type annotations and code completion for boto3.client("s3").
 boto3 documentation
# S3Client usage example
from boto3.session import Session
from types_boto3_s3.client import S3Client
def get_s3_client() -> S3Client:
    return Session().client("s3")Exceptions#
boto3 client exceptions are generated in runtime.
This class provides code completion for boto3.client("s3").exceptions structure.
# Exceptions.exceptions usage example
client = boto3.client("s3")
try:
    do_something(client)
except (
    client.exceptions.BucketAlreadyExists,
    client.exceptions.BucketAlreadyOwnedByYou,
    client.exceptions.ClientError,
    client.exceptions.EncryptionTypeMismatch,
    client.exceptions.IdempotencyParameterMismatch,
    client.exceptions.InvalidObjectState,
    client.exceptions.InvalidRequest,
    client.exceptions.InvalidWriteOffset,
    client.exceptions.NoSuchBucket,
    client.exceptions.NoSuchKey,
    client.exceptions.NoSuchUpload,
    client.exceptions.ObjectAlreadyInActiveTierError,
    client.exceptions.ObjectNotInActiveTierError,
    client.exceptions.TooManyParts,
) as e:
    print(e)# Exceptions.exceptions type checking example
from types_boto3_s3.client import Exceptions
def handle_error(exc: Exceptions.BucketAlreadyExists) -> None:
    ...Methods#
can_paginate#
Type annotations and code completion for boto3.client("s3").can_paginate method.
 boto3 documentation
# can_paginate method definition
def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...generate_presigned_url#
Type annotations and code completion for boto3.client("s3").generate_presigned_url method.
 boto3 documentation
# generate_presigned_url method definition
def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...abort_multipart_upload#
This operation aborts a multipart upload.
Type annotations and code completion for boto3.client("s3").abort_multipart_upload method.
 boto3 documentation
# abort_multipart_upload method definition
def abort_multipart_upload(
    self,
    *,
    Bucket: str,
    Key: str,
    UploadId: str,
    RequestPayer: RequestPayerType = ...,  # (1)
    ExpectedBucketOwner: str = ...,
    IfMatchInitiatedTime: TimestampTypeDef = ...,
) -> AbortMultipartUploadOutputTypeDef:  # (2)
    ...# abort_multipart_upload method usage example with argument unpacking
kwargs: AbortMultipartUploadRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
    "UploadId": ...,
}
parent.abort_multipart_upload(**kwargs)complete_multipart_upload#
Completes a multipart upload by assembling previously uploaded parts.
Type annotations and code completion for boto3.client("s3").complete_multipart_upload method.
 boto3 documentation
# complete_multipart_upload method definition
def complete_multipart_upload(
    self,
    *,
    Bucket: str,
    Key: str,
    UploadId: str,
    MultipartUpload: CompletedMultipartUploadTypeDef = ...,  # (1)
    ChecksumCRC32: str = ...,
    ChecksumCRC32C: str = ...,
    ChecksumCRC64NVME: str = ...,
    ChecksumSHA1: str = ...,
    ChecksumSHA256: str = ...,
    ChecksumType: ChecksumTypeType = ...,  # (2)
    MpuObjectSize: int = ...,
    RequestPayer: RequestPayerType = ...,  # (3)
    ExpectedBucketOwner: str = ...,
    IfMatch: str = ...,
    IfNoneMatch: str = ...,
    SSECustomerAlgorithm: str = ...,
    SSECustomerKey: str | bytes = ...,
) -> CompleteMultipartUploadOutputTypeDef:  # (4)
    ...- See CompletedMultipartUploadTypeDef
- See ChecksumTypeType
- See RequestPayerType
- See CompleteMultipartUploadOutputTypeDef
# complete_multipart_upload method usage example with argument unpacking
kwargs: CompleteMultipartUploadRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
    "UploadId": ...,
}
parent.complete_multipart_upload(**kwargs)copy_object#
Creates a copy of an object that is already stored in Amazon S3.
Type annotations and code completion for boto3.client("s3").copy_object method.
 boto3 documentation
# copy_object method definition
def copy_object(
    self,
    *,
    Bucket: str,
    CopySource: CopySourceOrStrTypeDef,  # (1)
    Key: str,
    ACL: ObjectCannedACLType = ...,  # (2)
    CacheControl: str = ...,
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (3)
    ContentDisposition: str = ...,
    ContentEncoding: str = ...,
    ContentLanguage: str = ...,
    ContentType: str = ...,
    CopySourceIfMatch: str = ...,
    CopySourceIfModifiedSince: TimestampTypeDef = ...,
    CopySourceIfNoneMatch: str = ...,
    CopySourceIfUnmodifiedSince: TimestampTypeDef = ...,
    Expires: TimestampTypeDef = ...,
    GrantFullControl: str = ...,
    GrantRead: str = ...,
    GrantReadACP: str = ...,
    GrantWriteACP: str = ...,
    IfMatch: str = ...,
    IfNoneMatch: str = ...,
    Metadata: Mapping[str, str] = ...,
    MetadataDirective: MetadataDirectiveType = ...,  # (4)
    TaggingDirective: TaggingDirectiveType = ...,  # (5)
    ServerSideEncryption: ServerSideEncryptionType = ...,  # (6)
    StorageClass: StorageClassType = ...,  # (7)
    WebsiteRedirectLocation: str = ...,
    SSECustomerAlgorithm: str = ...,
    SSECustomerKey: str | bytes = ...,
    SSEKMSKeyId: str = ...,
    SSEKMSEncryptionContext: str = ...,
    BucketKeyEnabled: bool = ...,
    CopySourceSSECustomerAlgorithm: str = ...,
    CopySourceSSECustomerKey: str | bytes = ...,
    RequestPayer: RequestPayerType = ...,  # (8)
    Tagging: str = ...,
    ObjectLockMode: ObjectLockModeType = ...,  # (9)
    ObjectLockRetainUntilDate: TimestampTypeDef = ...,
    ObjectLockLegalHoldStatus: ObjectLockLegalHoldStatusType = ...,  # (10)
    ExpectedBucketOwner: str = ...,
    ExpectedSourceBucketOwner: str = ...,
) -> CopyObjectOutputTypeDef:  # (11)
    ...- See CopySourceOrStrTypeDef
- See ObjectCannedACLType
- See ChecksumAlgorithmType
- See MetadataDirectiveType
- See TaggingDirectiveType
- See ServerSideEncryptionType
- See StorageClassType
- See RequestPayerType
- See ObjectLockModeType
- See ObjectLockLegalHoldStatusType
- See CopyObjectOutputTypeDef
# copy_object method usage example with argument unpacking
kwargs: CopyObjectRequestTypeDef = {  # (1)
    "Bucket": ...,
    "CopySource": ...,
    "Key": ...,
}
parent.copy_object(**kwargs)create_bucket#
End of support notice: As of October 1, 2025, Amazon S3 has discontinued support for Email Grantee Access Control Lists (ACLs).
Type annotations and code completion for boto3.client("s3").create_bucket method.
 boto3 documentation
# create_bucket method definition
def create_bucket(
    self,
    *,
    Bucket: str,
    ACL: BucketCannedACLType = ...,  # (1)
    CreateBucketConfiguration: CreateBucketConfigurationTypeDef = ...,  # (2)
    GrantFullControl: str = ...,
    GrantRead: str = ...,
    GrantReadACP: str = ...,
    GrantWrite: str = ...,
    GrantWriteACP: str = ...,
    ObjectLockEnabledForBucket: bool = ...,
    ObjectOwnership: ObjectOwnershipType = ...,  # (3)
) -> CreateBucketOutputTypeDef:  # (4)
    ...- See BucketCannedACLType
- See CreateBucketConfigurationTypeDef
- See ObjectOwnershipType
- See CreateBucketOutputTypeDef
# create_bucket method usage example with argument unpacking
kwargs: CreateBucketRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.create_bucket(**kwargs)create_bucket_metadata_configuration#
Creates an S3 Metadata V2 metadata configuration for a general purpose bucket.
Type annotations and code completion for boto3.client("s3").create_bucket_metadata_configuration method.
 boto3 documentation
# create_bucket_metadata_configuration method definition
def create_bucket_metadata_configuration(
    self,
    *,
    Bucket: str,
    MetadataConfiguration: MetadataConfigurationTypeDef,  # (1)
    ContentMD5: str = ...,
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (2)
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (3)
    ...# create_bucket_metadata_configuration method usage example with argument unpacking
kwargs: CreateBucketMetadataConfigurationRequestTypeDef = {  # (1)
    "Bucket": ...,
    "MetadataConfiguration": ...,
}
parent.create_bucket_metadata_configuration(**kwargs)create_bucket_metadata_table_configuration#
We recommend that you create your S3 Metadata configurations by using the V2 CreateBucketMetadataConfiguration API operation.
Type annotations and code completion for boto3.client("s3").create_bucket_metadata_table_configuration method.
 boto3 documentation
# create_bucket_metadata_table_configuration method definition
def create_bucket_metadata_table_configuration(
    self,
    *,
    Bucket: str,
    MetadataTableConfiguration: MetadataTableConfigurationTypeDef,  # (1)
    ContentMD5: str = ...,
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (2)
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (3)
    ...# create_bucket_metadata_table_configuration method usage example with argument unpacking
kwargs: CreateBucketMetadataTableConfigurationRequestTypeDef = {  # (1)
    "Bucket": ...,
    "MetadataTableConfiguration": ...,
}
parent.create_bucket_metadata_table_configuration(**kwargs)create_multipart_upload#
End of support notice: As of October 1, 2025, Amazon S3 has discontinued support for Email Grantee Access Control Lists (ACLs).
Type annotations and code completion for boto3.client("s3").create_multipart_upload method.
 boto3 documentation
# create_multipart_upload method definition
def create_multipart_upload(
    self,
    *,
    Bucket: str,
    Key: str,
    ACL: ObjectCannedACLType = ...,  # (1)
    CacheControl: str = ...,
    ContentDisposition: str = ...,
    ContentEncoding: str = ...,
    ContentLanguage: str = ...,
    ContentType: str = ...,
    Expires: TimestampTypeDef = ...,
    GrantFullControl: str = ...,
    GrantRead: str = ...,
    GrantReadACP: str = ...,
    GrantWriteACP: str = ...,
    Metadata: Mapping[str, str] = ...,
    ServerSideEncryption: ServerSideEncryptionType = ...,  # (2)
    StorageClass: StorageClassType = ...,  # (3)
    WebsiteRedirectLocation: str = ...,
    SSECustomerAlgorithm: str = ...,
    SSECustomerKey: str | bytes = ...,
    SSEKMSKeyId: str = ...,
    SSEKMSEncryptionContext: str = ...,
    BucketKeyEnabled: bool = ...,
    RequestPayer: RequestPayerType = ...,  # (4)
    Tagging: str = ...,
    ObjectLockMode: ObjectLockModeType = ...,  # (5)
    ObjectLockRetainUntilDate: TimestampTypeDef = ...,
    ObjectLockLegalHoldStatus: ObjectLockLegalHoldStatusType = ...,  # (6)
    ExpectedBucketOwner: str = ...,
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (7)
    ChecksumType: ChecksumTypeType = ...,  # (8)
) -> CreateMultipartUploadOutputTypeDef:  # (9)
    ...- See ObjectCannedACLType
- See ServerSideEncryptionType
- See StorageClassType
- See RequestPayerType
- See ObjectLockModeType
- See ObjectLockLegalHoldStatusType
- See ChecksumAlgorithmType
- See ChecksumTypeType
- See CreateMultipartUploadOutputTypeDef
# create_multipart_upload method usage example with argument unpacking
kwargs: CreateMultipartUploadRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
}
parent.create_multipart_upload(**kwargs)create_session#
Creates a session that establishes temporary security credentials to support fast authentication and authorization for the Zonal endpoint API operations on directory buckets.
Type annotations and code completion for boto3.client("s3").create_session method.
 boto3 documentation
# create_session method definition
def create_session(
    self,
    *,
    Bucket: str,
    SessionMode: SessionModeType = ...,  # (1)
    ServerSideEncryption: ServerSideEncryptionType = ...,  # (2)
    SSEKMSKeyId: str = ...,
    SSEKMSEncryptionContext: str = ...,
    BucketKeyEnabled: bool = ...,
) -> CreateSessionOutputTypeDef:  # (3)
    ...# create_session method usage example with argument unpacking
kwargs: CreateSessionRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.create_session(**kwargs)delete_bucket#
Deletes the S3 bucket.
Type annotations and code completion for boto3.client("s3").delete_bucket method.
 boto3 documentation
# delete_bucket method definition
def delete_bucket(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...# delete_bucket method usage example with argument unpacking
kwargs: DeleteBucketRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.delete_bucket(**kwargs)delete_bucket_analytics_configuration#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").delete_bucket_analytics_configuration method.
 boto3 documentation
# delete_bucket_analytics_configuration method definition
def delete_bucket_analytics_configuration(
    self,
    *,
    Bucket: str,
    Id: str,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...# delete_bucket_analytics_configuration method usage example with argument unpacking
kwargs: DeleteBucketAnalyticsConfigurationRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Id": ...,
}
parent.delete_bucket_analytics_configuration(**kwargs)delete_bucket_cors#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").delete_bucket_cors method.
 boto3 documentation
# delete_bucket_cors method definition
def delete_bucket_cors(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...# delete_bucket_cors method usage example with argument unpacking
kwargs: DeleteBucketCorsRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.delete_bucket_cors(**kwargs)delete_bucket_encryption#
This implementation of the DELETE action resets the default encryption for the bucket as server-side encryption with Amazon S3 managed keys (SSE-S3).
Type annotations and code completion for boto3.client("s3").delete_bucket_encryption method.
 boto3 documentation
# delete_bucket_encryption method definition
def delete_bucket_encryption(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...# delete_bucket_encryption method usage example with argument unpacking
kwargs: DeleteBucketEncryptionRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.delete_bucket_encryption(**kwargs)delete_bucket_intelligent_tiering_configuration#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").delete_bucket_intelligent_tiering_configuration method.
 boto3 documentation
# delete_bucket_intelligent_tiering_configuration method definition
def delete_bucket_intelligent_tiering_configuration(
    self,
    *,
    Bucket: str,
    Id: str,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...# delete_bucket_intelligent_tiering_configuration method usage example with argument unpacking
kwargs: DeleteBucketIntelligentTieringConfigurationRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Id": ...,
}
parent.delete_bucket_intelligent_tiering_configuration(**kwargs)delete_bucket_inventory_configuration#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").delete_bucket_inventory_configuration method.
 boto3 documentation
# delete_bucket_inventory_configuration method definition
def delete_bucket_inventory_configuration(
    self,
    *,
    Bucket: str,
    Id: str,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...# delete_bucket_inventory_configuration method usage example with argument unpacking
kwargs: DeleteBucketInventoryConfigurationRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Id": ...,
}
parent.delete_bucket_inventory_configuration(**kwargs)delete_bucket_lifecycle#
Deletes the lifecycle configuration from the specified bucket.
Type annotations and code completion for boto3.client("s3").delete_bucket_lifecycle method.
 boto3 documentation
# delete_bucket_lifecycle method definition
def delete_bucket_lifecycle(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...# delete_bucket_lifecycle method usage example with argument unpacking
kwargs: DeleteBucketLifecycleRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.delete_bucket_lifecycle(**kwargs)delete_bucket_metadata_configuration#
Deletes an S3 Metadata configuration from a general purpose bucket.
Type annotations and code completion for boto3.client("s3").delete_bucket_metadata_configuration method.
 boto3 documentation
# delete_bucket_metadata_configuration method definition
def delete_bucket_metadata_configuration(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...# delete_bucket_metadata_configuration method usage example with argument unpacking
kwargs: DeleteBucketMetadataConfigurationRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.delete_bucket_metadata_configuration(**kwargs)delete_bucket_metadata_table_configuration#
We recommend that you delete your S3 Metadata configurations by using the V2 DeleteBucketMetadataTableConfiguration API operation.
Type annotations and code completion for boto3.client("s3").delete_bucket_metadata_table_configuration method.
 boto3 documentation
# delete_bucket_metadata_table_configuration method definition
def delete_bucket_metadata_table_configuration(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...# delete_bucket_metadata_table_configuration method usage example with argument unpacking
kwargs: DeleteBucketMetadataTableConfigurationRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.delete_bucket_metadata_table_configuration(**kwargs)delete_bucket_metrics_configuration#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").delete_bucket_metrics_configuration method.
 boto3 documentation
# delete_bucket_metrics_configuration method definition
def delete_bucket_metrics_configuration(
    self,
    *,
    Bucket: str,
    Id: str,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...# delete_bucket_metrics_configuration method usage example with argument unpacking
kwargs: DeleteBucketMetricsConfigurationRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Id": ...,
}
parent.delete_bucket_metrics_configuration(**kwargs)delete_bucket_ownership_controls#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").delete_bucket_ownership_controls method.
 boto3 documentation
# delete_bucket_ownership_controls method definition
def delete_bucket_ownership_controls(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...# delete_bucket_ownership_controls method usage example with argument unpacking
kwargs: DeleteBucketOwnershipControlsRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.delete_bucket_ownership_controls(**kwargs)delete_bucket_policy#
Deletes the policy of a specified bucket.
Type annotations and code completion for boto3.client("s3").delete_bucket_policy method.
 boto3 documentation
# delete_bucket_policy method definition
def delete_bucket_policy(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...# delete_bucket_policy method usage example with argument unpacking
kwargs: DeleteBucketPolicyRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.delete_bucket_policy(**kwargs)delete_bucket_replication#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").delete_bucket_replication method.
 boto3 documentation
# delete_bucket_replication method definition
def delete_bucket_replication(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...# delete_bucket_replication method usage example with argument unpacking
kwargs: DeleteBucketReplicationRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.delete_bucket_replication(**kwargs)delete_bucket_tagging#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").delete_bucket_tagging method.
 boto3 documentation
# delete_bucket_tagging method definition
def delete_bucket_tagging(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...# delete_bucket_tagging method usage example with argument unpacking
kwargs: DeleteBucketTaggingRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.delete_bucket_tagging(**kwargs)delete_bucket_website#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").delete_bucket_website method.
 boto3 documentation
# delete_bucket_website method definition
def delete_bucket_website(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...# delete_bucket_website method usage example with argument unpacking
kwargs: DeleteBucketWebsiteRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.delete_bucket_website(**kwargs)delete_object#
Removes an object from a bucket.
Type annotations and code completion for boto3.client("s3").delete_object method.
 boto3 documentation
# delete_object method definition
def delete_object(
    self,
    *,
    Bucket: str,
    Key: str,
    MFA: str = ...,
    VersionId: str = ...,
    RequestPayer: RequestPayerType = ...,  # (1)
    BypassGovernanceRetention: bool = ...,
    ExpectedBucketOwner: str = ...,
    IfMatch: str = ...,
    IfMatchLastModifiedTime: TimestampTypeDef = ...,
    IfMatchSize: int = ...,
) -> DeleteObjectOutputTypeDef:  # (2)
    ...# delete_object method usage example with argument unpacking
kwargs: DeleteObjectRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
}
parent.delete_object(**kwargs)delete_object_tagging#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").delete_object_tagging method.
 boto3 documentation
# delete_object_tagging method definition
def delete_object_tagging(
    self,
    *,
    Bucket: str,
    Key: str,
    VersionId: str = ...,
    ExpectedBucketOwner: str = ...,
) -> DeleteObjectTaggingOutputTypeDef:  # (1)
    ...# delete_object_tagging method usage example with argument unpacking
kwargs: DeleteObjectTaggingRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
}
parent.delete_object_tagging(**kwargs)delete_objects#
This operation enables you to delete multiple objects from a bucket using a single HTTP request.
Type annotations and code completion for boto3.client("s3").delete_objects method.
 boto3 documentation
# delete_objects method definition
def delete_objects(
    self,
    *,
    Bucket: str,
    Delete: DeleteTypeDef,  # (1)
    MFA: str = ...,
    RequestPayer: RequestPayerType = ...,  # (2)
    BypassGovernanceRetention: bool = ...,
    ExpectedBucketOwner: str = ...,
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (3)
) -> DeleteObjectsOutputTypeDef:  # (4)
    ...- See DeleteTypeDef
- See RequestPayerType
- See ChecksumAlgorithmType
- See DeleteObjectsOutputTypeDef
# delete_objects method usage example with argument unpacking
kwargs: DeleteObjectsRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Delete": ...,
}
parent.delete_objects(**kwargs)delete_public_access_block#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").delete_public_access_block method.
 boto3 documentation
# delete_public_access_block method definition
def delete_public_access_block(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...# delete_public_access_block method usage example with argument unpacking
kwargs: DeletePublicAccessBlockRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.delete_public_access_block(**kwargs)get_bucket_accelerate_configuration#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").get_bucket_accelerate_configuration method.
 boto3 documentation
# get_bucket_accelerate_configuration method definition
def get_bucket_accelerate_configuration(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
    RequestPayer: RequestPayerType = ...,  # (1)
) -> GetBucketAccelerateConfigurationOutputTypeDef:  # (2)
    ...# get_bucket_accelerate_configuration method usage example with argument unpacking
kwargs: GetBucketAccelerateConfigurationRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.get_bucket_accelerate_configuration(**kwargs)get_bucket_acl#
End of support notice: Beginning November 21, 2025, Amazon S3 will stop
returning DisplayName.
Type annotations and code completion for boto3.client("s3").get_bucket_acl method.
 boto3 documentation
# get_bucket_acl method definition
def get_bucket_acl(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketAclOutputTypeDef:  # (1)
    ...# get_bucket_acl method usage example with argument unpacking
kwargs: GetBucketAclRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.get_bucket_acl(**kwargs)get_bucket_analytics_configuration#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").get_bucket_analytics_configuration method.
 boto3 documentation
# get_bucket_analytics_configuration method definition
def get_bucket_analytics_configuration(
    self,
    *,
    Bucket: str,
    Id: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketAnalyticsConfigurationOutputTypeDef:  # (1)
    ...# get_bucket_analytics_configuration method usage example with argument unpacking
kwargs: GetBucketAnalyticsConfigurationRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Id": ...,
}
parent.get_bucket_analytics_configuration(**kwargs)get_bucket_cors#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").get_bucket_cors method.
 boto3 documentation
# get_bucket_cors method definition
def get_bucket_cors(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketCorsOutputTypeDef:  # (1)
    ...# get_bucket_cors method usage example with argument unpacking
kwargs: GetBucketCorsRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.get_bucket_cors(**kwargs)get_bucket_encryption#
Returns the default encryption configuration for an Amazon S3 bucket.
Type annotations and code completion for boto3.client("s3").get_bucket_encryption method.
 boto3 documentation
# get_bucket_encryption method definition
def get_bucket_encryption(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketEncryptionOutputTypeDef:  # (1)
    ...# get_bucket_encryption method usage example with argument unpacking
kwargs: GetBucketEncryptionRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.get_bucket_encryption(**kwargs)get_bucket_intelligent_tiering_configuration#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").get_bucket_intelligent_tiering_configuration method.
 boto3 documentation
# get_bucket_intelligent_tiering_configuration method definition
def get_bucket_intelligent_tiering_configuration(
    self,
    *,
    Bucket: str,
    Id: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketIntelligentTieringConfigurationOutputTypeDef:  # (1)
    ...# get_bucket_intelligent_tiering_configuration method usage example with argument unpacking
kwargs: GetBucketIntelligentTieringConfigurationRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Id": ...,
}
parent.get_bucket_intelligent_tiering_configuration(**kwargs)get_bucket_inventory_configuration#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").get_bucket_inventory_configuration method.
 boto3 documentation
# get_bucket_inventory_configuration method definition
def get_bucket_inventory_configuration(
    self,
    *,
    Bucket: str,
    Id: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketInventoryConfigurationOutputTypeDef:  # (1)
    ...# get_bucket_inventory_configuration method usage example with argument unpacking
kwargs: GetBucketInventoryConfigurationRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Id": ...,
}
parent.get_bucket_inventory_configuration(**kwargs)get_bucket_lifecycle#
For an updated version of this API, see GetBucketLifecycleConfiguration.
Type annotations and code completion for boto3.client("s3").get_bucket_lifecycle method.
 boto3 documentation
# get_bucket_lifecycle method definition
def get_bucket_lifecycle(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketLifecycleOutputTypeDef:  # (1)
    ...# get_bucket_lifecycle method usage example with argument unpacking
kwargs: GetBucketLifecycleRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.get_bucket_lifecycle(**kwargs)get_bucket_lifecycle_configuration#
Returns the lifecycle configuration information set on the bucket.
Type annotations and code completion for boto3.client("s3").get_bucket_lifecycle_configuration method.
 boto3 documentation
# get_bucket_lifecycle_configuration method definition
def get_bucket_lifecycle_configuration(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketLifecycleConfigurationOutputTypeDef:  # (1)
    ...# get_bucket_lifecycle_configuration method usage example with argument unpacking
kwargs: GetBucketLifecycleConfigurationRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.get_bucket_lifecycle_configuration(**kwargs)get_bucket_location#
Using the GetBucketLocation operation is no longer a best practice.
Type annotations and code completion for boto3.client("s3").get_bucket_location method.
 boto3 documentation
# get_bucket_location method definition
def get_bucket_location(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketLocationOutputTypeDef:  # (1)
    ...# get_bucket_location method usage example with argument unpacking
kwargs: GetBucketLocationRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.get_bucket_location(**kwargs)get_bucket_logging#
End of support notice: Beginning November 21, 2025, Amazon S3 will stop
returning DisplayName.
Type annotations and code completion for boto3.client("s3").get_bucket_logging method.
 boto3 documentation
# get_bucket_logging method definition
def get_bucket_logging(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketLoggingOutputTypeDef:  # (1)
    ...# get_bucket_logging method usage example with argument unpacking
kwargs: GetBucketLoggingRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.get_bucket_logging(**kwargs)get_bucket_metadata_configuration#
Retrieves the S3 Metadata configuration for a general purpose bucket.
Type annotations and code completion for boto3.client("s3").get_bucket_metadata_configuration method.
 boto3 documentation
# get_bucket_metadata_configuration method definition
def get_bucket_metadata_configuration(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketMetadataConfigurationOutputTypeDef:  # (1)
    ...# get_bucket_metadata_configuration method usage example with argument unpacking
kwargs: GetBucketMetadataConfigurationRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.get_bucket_metadata_configuration(**kwargs)get_bucket_metadata_table_configuration#
We recommend that you retrieve your S3 Metadata configurations by using the V2 GetBucketMetadataTableConfiguration API operation.
Type annotations and code completion for boto3.client("s3").get_bucket_metadata_table_configuration method.
 boto3 documentation
# get_bucket_metadata_table_configuration method definition
def get_bucket_metadata_table_configuration(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketMetadataTableConfigurationOutputTypeDef:  # (1)
    ...# get_bucket_metadata_table_configuration method usage example with argument unpacking
kwargs: GetBucketMetadataTableConfigurationRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.get_bucket_metadata_table_configuration(**kwargs)get_bucket_metrics_configuration#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").get_bucket_metrics_configuration method.
 boto3 documentation
# get_bucket_metrics_configuration method definition
def get_bucket_metrics_configuration(
    self,
    *,
    Bucket: str,
    Id: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketMetricsConfigurationOutputTypeDef:  # (1)
    ...# get_bucket_metrics_configuration method usage example with argument unpacking
kwargs: GetBucketMetricsConfigurationRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Id": ...,
}
parent.get_bucket_metrics_configuration(**kwargs)get_bucket_notification#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").get_bucket_notification method.
 boto3 documentation
# get_bucket_notification method definition
def get_bucket_notification(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> NotificationConfigurationDeprecatedResponseTypeDef:  # (1)
    ...# get_bucket_notification method usage example with argument unpacking
kwargs: GetBucketNotificationConfigurationRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.get_bucket_notification(**kwargs)get_bucket_notification_configuration#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").get_bucket_notification_configuration method.
 boto3 documentation
# get_bucket_notification_configuration method definition
def get_bucket_notification_configuration(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> NotificationConfigurationResponseTypeDef:  # (1)
    ...# get_bucket_notification_configuration method usage example with argument unpacking
kwargs: GetBucketNotificationConfigurationRequestRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.get_bucket_notification_configuration(**kwargs)get_bucket_ownership_controls#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").get_bucket_ownership_controls method.
 boto3 documentation
# get_bucket_ownership_controls method definition
def get_bucket_ownership_controls(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketOwnershipControlsOutputTypeDef:  # (1)
    ...# get_bucket_ownership_controls method usage example with argument unpacking
kwargs: GetBucketOwnershipControlsRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.get_bucket_ownership_controls(**kwargs)get_bucket_policy#
Returns the policy of a specified bucket.
Type annotations and code completion for boto3.client("s3").get_bucket_policy method.
 boto3 documentation
# get_bucket_policy method definition
def get_bucket_policy(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketPolicyOutputTypeDef:  # (1)
    ...# get_bucket_policy method usage example with argument unpacking
kwargs: GetBucketPolicyRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.get_bucket_policy(**kwargs)get_bucket_policy_status#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").get_bucket_policy_status method.
 boto3 documentation
# get_bucket_policy_status method definition
def get_bucket_policy_status(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketPolicyStatusOutputTypeDef:  # (1)
    ...# get_bucket_policy_status method usage example with argument unpacking
kwargs: GetBucketPolicyStatusRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.get_bucket_policy_status(**kwargs)get_bucket_replication#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").get_bucket_replication method.
 boto3 documentation
# get_bucket_replication method definition
def get_bucket_replication(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketReplicationOutputTypeDef:  # (1)
    ...# get_bucket_replication method usage example with argument unpacking
kwargs: GetBucketReplicationRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.get_bucket_replication(**kwargs)get_bucket_request_payment#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").get_bucket_request_payment method.
 boto3 documentation
# get_bucket_request_payment method definition
def get_bucket_request_payment(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketRequestPaymentOutputTypeDef:  # (1)
    ...# get_bucket_request_payment method usage example with argument unpacking
kwargs: GetBucketRequestPaymentRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.get_bucket_request_payment(**kwargs)get_bucket_tagging#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").get_bucket_tagging method.
 boto3 documentation
# get_bucket_tagging method definition
def get_bucket_tagging(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketTaggingOutputTypeDef:  # (1)
    ...# get_bucket_tagging method usage example with argument unpacking
kwargs: GetBucketTaggingRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.get_bucket_tagging(**kwargs)get_bucket_versioning#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").get_bucket_versioning method.
 boto3 documentation
# get_bucket_versioning method definition
def get_bucket_versioning(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketVersioningOutputTypeDef:  # (1)
    ...# get_bucket_versioning method usage example with argument unpacking
kwargs: GetBucketVersioningRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.get_bucket_versioning(**kwargs)get_bucket_website#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").get_bucket_website method.
 boto3 documentation
# get_bucket_website method definition
def get_bucket_website(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetBucketWebsiteOutputTypeDef:  # (1)
    ...# get_bucket_website method usage example with argument unpacking
kwargs: GetBucketWebsiteRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.get_bucket_website(**kwargs)get_object#
Retrieves an object from Amazon S3.
Type annotations and code completion for boto3.client("s3").get_object method.
 boto3 documentation
# get_object method definition
def get_object(
    self,
    *,
    Bucket: str,
    Key: str,
    IfMatch: str = ...,
    IfModifiedSince: TimestampTypeDef = ...,
    IfNoneMatch: str = ...,
    IfUnmodifiedSince: TimestampTypeDef = ...,
    Range: str = ...,
    ResponseCacheControl: str = ...,
    ResponseContentDisposition: str = ...,
    ResponseContentEncoding: str = ...,
    ResponseContentLanguage: str = ...,
    ResponseContentType: str = ...,
    ResponseExpires: TimestampTypeDef = ...,
    VersionId: str = ...,
    SSECustomerAlgorithm: str = ...,
    SSECustomerKey: str | bytes = ...,
    RequestPayer: RequestPayerType = ...,  # (1)
    PartNumber: int = ...,
    ExpectedBucketOwner: str = ...,
    ChecksumMode: ChecksumModeType = ...,  # (2)
) -> GetObjectOutputTypeDef:  # (3)
    ...- See RequestPayerType
- See ChecksumModeType
- See GetObjectOutputTypeDef
# get_object method usage example with argument unpacking
kwargs: GetObjectRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
}
parent.get_object(**kwargs)get_object_acl#
End of support notice: Beginning November 21, 2025, Amazon S3 will stop
returning DisplayName.
Type annotations and code completion for boto3.client("s3").get_object_acl method.
 boto3 documentation
# get_object_acl method definition
def get_object_acl(
    self,
    *,
    Bucket: str,
    Key: str,
    VersionId: str = ...,
    RequestPayer: RequestPayerType = ...,  # (1)
    ExpectedBucketOwner: str = ...,
) -> GetObjectAclOutputTypeDef:  # (2)
    ...# get_object_acl method usage example with argument unpacking
kwargs: GetObjectAclRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
}
parent.get_object_acl(**kwargs)get_object_attributes#
Retrieves all of the metadata from an object without returning the object itself.
Type annotations and code completion for boto3.client("s3").get_object_attributes method.
 boto3 documentation
# get_object_attributes method definition
def get_object_attributes(
    self,
    *,
    Bucket: str,
    Key: str,
    ObjectAttributes: Sequence[ObjectAttributesType],  # (1)
    VersionId: str = ...,
    MaxParts: int = ...,
    PartNumberMarker: int = ...,
    SSECustomerAlgorithm: str = ...,
    SSECustomerKey: str | bytes = ...,
    RequestPayer: RequestPayerType = ...,  # (2)
    ExpectedBucketOwner: str = ...,
) -> GetObjectAttributesOutputTypeDef:  # (3)
    ...- See Sequence[ObjectAttributesType]
- See RequestPayerType
- See GetObjectAttributesOutputTypeDef
# get_object_attributes method usage example with argument unpacking
kwargs: GetObjectAttributesRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
    "ObjectAttributes": ...,
}
parent.get_object_attributes(**kwargs)get_object_legal_hold#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").get_object_legal_hold method.
 boto3 documentation
# get_object_legal_hold method definition
def get_object_legal_hold(
    self,
    *,
    Bucket: str,
    Key: str,
    VersionId: str = ...,
    RequestPayer: RequestPayerType = ...,  # (1)
    ExpectedBucketOwner: str = ...,
) -> GetObjectLegalHoldOutputTypeDef:  # (2)
    ...# get_object_legal_hold method usage example with argument unpacking
kwargs: GetObjectLegalHoldRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
}
parent.get_object_legal_hold(**kwargs)get_object_lock_configuration#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").get_object_lock_configuration method.
 boto3 documentation
# get_object_lock_configuration method definition
def get_object_lock_configuration(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetObjectLockConfigurationOutputTypeDef:  # (1)
    ...# get_object_lock_configuration method usage example with argument unpacking
kwargs: GetObjectLockConfigurationRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.get_object_lock_configuration(**kwargs)get_object_retention#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").get_object_retention method.
 boto3 documentation
# get_object_retention method definition
def get_object_retention(
    self,
    *,
    Bucket: str,
    Key: str,
    VersionId: str = ...,
    RequestPayer: RequestPayerType = ...,  # (1)
    ExpectedBucketOwner: str = ...,
) -> GetObjectRetentionOutputTypeDef:  # (2)
    ...# get_object_retention method usage example with argument unpacking
kwargs: GetObjectRetentionRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
}
parent.get_object_retention(**kwargs)get_object_tagging#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").get_object_tagging method.
 boto3 documentation
# get_object_tagging method definition
def get_object_tagging(
    self,
    *,
    Bucket: str,
    Key: str,
    VersionId: str = ...,
    ExpectedBucketOwner: str = ...,
    RequestPayer: RequestPayerType = ...,  # (1)
) -> GetObjectTaggingOutputTypeDef:  # (2)
    ...# get_object_tagging method usage example with argument unpacking
kwargs: GetObjectTaggingRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
}
parent.get_object_tagging(**kwargs)get_object_torrent#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").get_object_torrent method.
 boto3 documentation
# get_object_torrent method definition
def get_object_torrent(
    self,
    *,
    Bucket: str,
    Key: str,
    RequestPayer: RequestPayerType = ...,  # (1)
    ExpectedBucketOwner: str = ...,
) -> GetObjectTorrentOutputTypeDef:  # (2)
    ...# get_object_torrent method usage example with argument unpacking
kwargs: GetObjectTorrentRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
}
parent.get_object_torrent(**kwargs)get_public_access_block#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").get_public_access_block method.
 boto3 documentation
# get_public_access_block method definition
def get_public_access_block(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> GetPublicAccessBlockOutputTypeDef:  # (1)
    ...# get_public_access_block method usage example with argument unpacking
kwargs: GetPublicAccessBlockRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.get_public_access_block(**kwargs)head_bucket#
You can use this operation to determine if a bucket exists and if you have permission to access it.
Type annotations and code completion for boto3.client("s3").head_bucket method.
 boto3 documentation
# head_bucket method definition
def head_bucket(
    self,
    *,
    Bucket: str,
    ExpectedBucketOwner: str = ...,
) -> HeadBucketOutputTypeDef:  # (1)
    ...# head_bucket method usage example with argument unpacking
kwargs: HeadBucketRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.head_bucket(**kwargs)head_object#
The HEAD operation retrieves metadata from an object without
returning the object itself.
Type annotations and code completion for boto3.client("s3").head_object method.
 boto3 documentation
# head_object method definition
def head_object(
    self,
    *,
    Bucket: str,
    Key: str,
    IfMatch: str = ...,
    IfModifiedSince: TimestampTypeDef = ...,
    IfNoneMatch: str = ...,
    IfUnmodifiedSince: TimestampTypeDef = ...,
    Range: str = ...,
    ResponseCacheControl: str = ...,
    ResponseContentDisposition: str = ...,
    ResponseContentEncoding: str = ...,
    ResponseContentLanguage: str = ...,
    ResponseContentType: str = ...,
    ResponseExpires: TimestampTypeDef = ...,
    VersionId: str = ...,
    SSECustomerAlgorithm: str = ...,
    SSECustomerKey: str | bytes = ...,
    RequestPayer: RequestPayerType = ...,  # (1)
    PartNumber: int = ...,
    ExpectedBucketOwner: str = ...,
    ChecksumMode: ChecksumModeType = ...,  # (2)
) -> HeadObjectOutputTypeDef:  # (3)
    ...- See RequestPayerType
- See ChecksumModeType
- See HeadObjectOutputTypeDef
# head_object method usage example with argument unpacking
kwargs: HeadObjectRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
}
parent.head_object(**kwargs)list_bucket_analytics_configurations#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").list_bucket_analytics_configurations method.
 boto3 documentation
# list_bucket_analytics_configurations method definition
def list_bucket_analytics_configurations(
    self,
    *,
    Bucket: str,
    ContinuationToken: str = ...,
    ExpectedBucketOwner: str = ...,
) -> ListBucketAnalyticsConfigurationsOutputTypeDef:  # (1)
    ...# list_bucket_analytics_configurations method usage example with argument unpacking
kwargs: ListBucketAnalyticsConfigurationsRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.list_bucket_analytics_configurations(**kwargs)list_bucket_intelligent_tiering_configurations#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").list_bucket_intelligent_tiering_configurations method.
 boto3 documentation
# list_bucket_intelligent_tiering_configurations method definition
def list_bucket_intelligent_tiering_configurations(
    self,
    *,
    Bucket: str,
    ContinuationToken: str = ...,
    ExpectedBucketOwner: str = ...,
) -> ListBucketIntelligentTieringConfigurationsOutputTypeDef:  # (1)
    ...# list_bucket_intelligent_tiering_configurations method usage example with argument unpacking
kwargs: ListBucketIntelligentTieringConfigurationsRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.list_bucket_intelligent_tiering_configurations(**kwargs)list_bucket_inventory_configurations#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").list_bucket_inventory_configurations method.
 boto3 documentation
# list_bucket_inventory_configurations method definition
def list_bucket_inventory_configurations(
    self,
    *,
    Bucket: str,
    ContinuationToken: str = ...,
    ExpectedBucketOwner: str = ...,
) -> ListBucketInventoryConfigurationsOutputTypeDef:  # (1)
    ...# list_bucket_inventory_configurations method usage example with argument unpacking
kwargs: ListBucketInventoryConfigurationsRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.list_bucket_inventory_configurations(**kwargs)list_bucket_metrics_configurations#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").list_bucket_metrics_configurations method.
 boto3 documentation
# list_bucket_metrics_configurations method definition
def list_bucket_metrics_configurations(
    self,
    *,
    Bucket: str,
    ContinuationToken: str = ...,
    ExpectedBucketOwner: str = ...,
) -> ListBucketMetricsConfigurationsOutputTypeDef:  # (1)
    ...# list_bucket_metrics_configurations method usage example with argument unpacking
kwargs: ListBucketMetricsConfigurationsRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.list_bucket_metrics_configurations(**kwargs)list_buckets#
End of support notice: Beginning November 21, 2025, Amazon S3 will stop
returning DisplayName.
Type annotations and code completion for boto3.client("s3").list_buckets method.
 boto3 documentation
# list_buckets method definition
def list_buckets(
    self,
    *,
    MaxBuckets: int = ...,
    ContinuationToken: str = ...,
    Prefix: str = ...,
    BucketRegion: str = ...,
) -> ListBucketsOutputTypeDef:  # (1)
    ...# list_buckets method usage example with argument unpacking
kwargs: ListBucketsRequestTypeDef = {  # (1)
    "MaxBuckets": ...,
}
parent.list_buckets(**kwargs)list_directory_buckets#
Returns a list of all Amazon S3 directory buckets owned by the authenticated sender of the request.
Type annotations and code completion for boto3.client("s3").list_directory_buckets method.
 boto3 documentation
# list_directory_buckets method definition
def list_directory_buckets(
    self,
    *,
    ContinuationToken: str = ...,
    MaxDirectoryBuckets: int = ...,
) -> ListDirectoryBucketsOutputTypeDef:  # (1)
    ...# list_directory_buckets method usage example with argument unpacking
kwargs: ListDirectoryBucketsRequestTypeDef = {  # (1)
    "ContinuationToken": ...,
}
parent.list_directory_buckets(**kwargs)list_multipart_uploads#
End of support notice: Beginning November 21, 2025, Amazon S3 will stop
returning DisplayName.
Type annotations and code completion for boto3.client("s3").list_multipart_uploads method.
 boto3 documentation
# list_multipart_uploads method definition
def list_multipart_uploads(
    self,
    *,
    Bucket: str,
    Delimiter: str = ...,
    EncodingType: EncodingTypeType = ...,  # (1)
    KeyMarker: str = ...,
    MaxUploads: int = ...,
    Prefix: str = ...,
    UploadIdMarker: str = ...,
    ExpectedBucketOwner: str = ...,
    RequestPayer: RequestPayerType = ...,  # (2)
) -> ListMultipartUploadsOutputTypeDef:  # (3)
    ...# list_multipart_uploads method usage example with argument unpacking
kwargs: ListMultipartUploadsRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.list_multipart_uploads(**kwargs)list_object_versions#
End of support notice: Beginning November 21, 2025, Amazon S3 will stop
returning DisplayName.
Type annotations and code completion for boto3.client("s3").list_object_versions method.
 boto3 documentation
# list_object_versions method definition
def list_object_versions(
    self,
    *,
    Bucket: str,
    Delimiter: str = ...,
    EncodingType: EncodingTypeType = ...,  # (1)
    KeyMarker: str = ...,
    MaxKeys: int = ...,
    Prefix: str = ...,
    VersionIdMarker: str = ...,
    ExpectedBucketOwner: str = ...,
    RequestPayer: RequestPayerType = ...,  # (2)
    OptionalObjectAttributes: Sequence[OptionalObjectAttributesType] = ...,  # (3)
) -> ListObjectVersionsOutputTypeDef:  # (4)
    ...- See EncodingTypeType
- See RequestPayerType
- See Sequence[Literal['RestoreStatus']]
- See ListObjectVersionsOutputTypeDef
# list_object_versions method usage example with argument unpacking
kwargs: ListObjectVersionsRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.list_object_versions(**kwargs)list_objects#
End of support notice: Beginning November 21, 2025, Amazon S3 will stop
returning DisplayName.
Type annotations and code completion for boto3.client("s3").list_objects method.
 boto3 documentation
# list_objects method definition
def list_objects(
    self,
    *,
    Bucket: str,
    Delimiter: str = ...,
    EncodingType: EncodingTypeType = ...,  # (1)
    Marker: str = ...,
    MaxKeys: int = ...,
    Prefix: str = ...,
    RequestPayer: RequestPayerType = ...,  # (2)
    ExpectedBucketOwner: str = ...,
    OptionalObjectAttributes: Sequence[OptionalObjectAttributesType] = ...,  # (3)
) -> ListObjectsOutputTypeDef:  # (4)
    ...- See EncodingTypeType
- See RequestPayerType
- See Sequence[Literal['RestoreStatus']]
- See ListObjectsOutputTypeDef
# list_objects method usage example with argument unpacking
kwargs: ListObjectsRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.list_objects(**kwargs)list_objects_v2#
End of support notice: Beginning November 21, 2025, Amazon S3 will stop
returning DisplayName.
Type annotations and code completion for boto3.client("s3").list_objects_v2 method.
 boto3 documentation
# list_objects_v2 method definition
def list_objects_v2(
    self,
    *,
    Bucket: str,
    Delimiter: str = ...,
    EncodingType: EncodingTypeType = ...,  # (1)
    MaxKeys: int = ...,
    Prefix: str = ...,
    ContinuationToken: str = ...,
    FetchOwner: bool = ...,
    StartAfter: str = ...,
    RequestPayer: RequestPayerType = ...,  # (2)
    ExpectedBucketOwner: str = ...,
    OptionalObjectAttributes: Sequence[OptionalObjectAttributesType] = ...,  # (3)
) -> ListObjectsV2OutputTypeDef:  # (4)
    ...- See EncodingTypeType
- See RequestPayerType
- See Sequence[Literal['RestoreStatus']]
- See ListObjectsV2OutputTypeDef
# list_objects_v2 method usage example with argument unpacking
kwargs: ListObjectsV2RequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.list_objects_v2(**kwargs)list_parts#
End of support notice: Beginning November 21, 2025, Amazon S3 will stop
returning DisplayName.
Type annotations and code completion for boto3.client("s3").list_parts method.
 boto3 documentation
# list_parts method definition
def list_parts(
    self,
    *,
    Bucket: str,
    Key: str,
    UploadId: str,
    MaxParts: int = ...,
    PartNumberMarker: int = ...,
    RequestPayer: RequestPayerType = ...,  # (1)
    ExpectedBucketOwner: str = ...,
    SSECustomerAlgorithm: str = ...,
    SSECustomerKey: str | bytes = ...,
) -> ListPartsOutputTypeDef:  # (2)
    ...# list_parts method usage example with argument unpacking
kwargs: ListPartsRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
    "UploadId": ...,
}
parent.list_parts(**kwargs)put_bucket_accelerate_configuration#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").put_bucket_accelerate_configuration method.
 boto3 documentation
# put_bucket_accelerate_configuration method definition
def put_bucket_accelerate_configuration(
    self,
    *,
    Bucket: str,
    AccelerateConfiguration: AccelerateConfigurationTypeDef,  # (1)
    ExpectedBucketOwner: str = ...,
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (2)
) -> EmptyResponseMetadataTypeDef:  # (3)
    ...# put_bucket_accelerate_configuration method usage example with argument unpacking
kwargs: PutBucketAccelerateConfigurationRequestTypeDef = {  # (1)
    "Bucket": ...,
    "AccelerateConfiguration": ...,
}
parent.put_bucket_accelerate_configuration(**kwargs)put_bucket_acl#
End of support notice: As of October 1, 2025, Amazon S3 has discontinued support for Email Grantee Access Control Lists (ACLs).
Type annotations and code completion for boto3.client("s3").put_bucket_acl method.
 boto3 documentation
# put_bucket_acl method definition
def put_bucket_acl(
    self,
    *,
    Bucket: str,
    ACL: BucketCannedACLType = ...,  # (1)
    AccessControlPolicy: AccessControlPolicyTypeDef = ...,  # (2)
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (3)
    GrantFullControl: str = ...,
    GrantRead: str = ...,
    GrantReadACP: str = ...,
    GrantWrite: str = ...,
    GrantWriteACP: str = ...,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (4)
    ...- See BucketCannedACLType
- See AccessControlPolicyTypeDef
- See ChecksumAlgorithmType
- See EmptyResponseMetadataTypeDef
# put_bucket_acl method usage example with argument unpacking
kwargs: PutBucketAclRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.put_bucket_acl(**kwargs)put_bucket_analytics_configuration#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").put_bucket_analytics_configuration method.
 boto3 documentation
# put_bucket_analytics_configuration method definition
def put_bucket_analytics_configuration(
    self,
    *,
    Bucket: str,
    Id: str,
    AnalyticsConfiguration: AnalyticsConfigurationUnionTypeDef,  # (1)
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...# put_bucket_analytics_configuration method usage example with argument unpacking
kwargs: PutBucketAnalyticsConfigurationRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Id": ...,
    "AnalyticsConfiguration": ...,
}
parent.put_bucket_analytics_configuration(**kwargs)put_bucket_cors#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").put_bucket_cors method.
 boto3 documentation
# put_bucket_cors method definition
def put_bucket_cors(
    self,
    *,
    Bucket: str,
    CORSConfiguration: CORSConfigurationTypeDef,  # (1)
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (2)
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (3)
    ...# put_bucket_cors method usage example with argument unpacking
kwargs: PutBucketCorsRequestTypeDef = {  # (1)
    "Bucket": ...,
    "CORSConfiguration": ...,
}
parent.put_bucket_cors(**kwargs)put_bucket_encryption#
This operation configures default encryption and Amazon S3 Bucket Keys for an existing bucket.
Type annotations and code completion for boto3.client("s3").put_bucket_encryption method.
 boto3 documentation
# put_bucket_encryption method definition
def put_bucket_encryption(
    self,
    *,
    Bucket: str,
    ServerSideEncryptionConfiguration: ServerSideEncryptionConfigurationUnionTypeDef,  # (1)
    ContentMD5: str = ...,
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (2)
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (3)
    ...- See ServerSideEncryptionConfigurationUnionTypeDef
- See ChecksumAlgorithmType
- See EmptyResponseMetadataTypeDef
# put_bucket_encryption method usage example with argument unpacking
kwargs: PutBucketEncryptionRequestTypeDef = {  # (1)
    "Bucket": ...,
    "ServerSideEncryptionConfiguration": ...,
}
parent.put_bucket_encryption(**kwargs)put_bucket_intelligent_tiering_configuration#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").put_bucket_intelligent_tiering_configuration method.
 boto3 documentation
# put_bucket_intelligent_tiering_configuration method definition
def put_bucket_intelligent_tiering_configuration(
    self,
    *,
    Bucket: str,
    Id: str,
    IntelligentTieringConfiguration: IntelligentTieringConfigurationUnionTypeDef,  # (1)
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...# put_bucket_intelligent_tiering_configuration method usage example with argument unpacking
kwargs: PutBucketIntelligentTieringConfigurationRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Id": ...,
    "IntelligentTieringConfiguration": ...,
}
parent.put_bucket_intelligent_tiering_configuration(**kwargs)put_bucket_inventory_configuration#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").put_bucket_inventory_configuration method.
 boto3 documentation
# put_bucket_inventory_configuration method definition
def put_bucket_inventory_configuration(
    self,
    *,
    Bucket: str,
    Id: str,
    InventoryConfiguration: InventoryConfigurationUnionTypeDef,  # (1)
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...# put_bucket_inventory_configuration method usage example with argument unpacking
kwargs: PutBucketInventoryConfigurationRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Id": ...,
    "InventoryConfiguration": ...,
}
parent.put_bucket_inventory_configuration(**kwargs)put_bucket_lifecycle#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").put_bucket_lifecycle method.
 boto3 documentation
# put_bucket_lifecycle method definition
def put_bucket_lifecycle(
    self,
    *,
    Bucket: str,
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (1)
    LifecycleConfiguration: LifecycleConfigurationTypeDef = ...,  # (2)
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (3)
    ...# put_bucket_lifecycle method usage example with argument unpacking
kwargs: PutBucketLifecycleRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.put_bucket_lifecycle(**kwargs)put_bucket_lifecycle_configuration#
Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle configuration.
Type annotations and code completion for boto3.client("s3").put_bucket_lifecycle_configuration method.
 boto3 documentation
# put_bucket_lifecycle_configuration method definition
def put_bucket_lifecycle_configuration(
    self,
    *,
    Bucket: str,
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (1)
    LifecycleConfiguration: BucketLifecycleConfigurationTypeDef = ...,  # (2)
    ExpectedBucketOwner: str = ...,
    TransitionDefaultMinimumObjectSize: TransitionDefaultMinimumObjectSizeType = ...,  # (3)
) -> PutBucketLifecycleConfigurationOutputTypeDef:  # (4)
    ...- See ChecksumAlgorithmType
- See BucketLifecycleConfigurationTypeDef
- See TransitionDefaultMinimumObjectSizeType
- See PutBucketLifecycleConfigurationOutputTypeDef
# put_bucket_lifecycle_configuration method usage example with argument unpacking
kwargs: PutBucketLifecycleConfigurationRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.put_bucket_lifecycle_configuration(**kwargs)put_bucket_logging#
End of support notice: As of October 1, 2025, Amazon S3 has discontinued support for Email Grantee Access Control Lists (ACLs).
Type annotations and code completion for boto3.client("s3").put_bucket_logging method.
 boto3 documentation
# put_bucket_logging method definition
def put_bucket_logging(
    self,
    *,
    Bucket: str,
    BucketLoggingStatus: BucketLoggingStatusTypeDef,  # (1)
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (2)
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (3)
    ...# put_bucket_logging method usage example with argument unpacking
kwargs: PutBucketLoggingRequestTypeDef = {  # (1)
    "Bucket": ...,
    "BucketLoggingStatus": ...,
}
parent.put_bucket_logging(**kwargs)put_bucket_metrics_configuration#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").put_bucket_metrics_configuration method.
 boto3 documentation
# put_bucket_metrics_configuration method definition
def put_bucket_metrics_configuration(
    self,
    *,
    Bucket: str,
    Id: str,
    MetricsConfiguration: MetricsConfigurationUnionTypeDef,  # (1)
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...# put_bucket_metrics_configuration method usage example with argument unpacking
kwargs: PutBucketMetricsConfigurationRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Id": ...,
    "MetricsConfiguration": ...,
}
parent.put_bucket_metrics_configuration(**kwargs)put_bucket_notification#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").put_bucket_notification method.
 boto3 documentation
# put_bucket_notification method definition
def put_bucket_notification(
    self,
    *,
    Bucket: str,
    NotificationConfiguration: NotificationConfigurationDeprecatedTypeDef,  # (1)
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (2)
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (3)
    ...- See NotificationConfigurationDeprecatedTypeDef
- See ChecksumAlgorithmType
- See EmptyResponseMetadataTypeDef
# put_bucket_notification method usage example with argument unpacking
kwargs: PutBucketNotificationRequestTypeDef = {  # (1)
    "Bucket": ...,
    "NotificationConfiguration": ...,
}
parent.put_bucket_notification(**kwargs)put_bucket_notification_configuration#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").put_bucket_notification_configuration method.
 boto3 documentation
# put_bucket_notification_configuration method definition
def put_bucket_notification_configuration(
    self,
    *,
    Bucket: str,
    NotificationConfiguration: NotificationConfigurationTypeDef,  # (1)
    ExpectedBucketOwner: str = ...,
    SkipDestinationValidation: bool = ...,
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...# put_bucket_notification_configuration method usage example with argument unpacking
kwargs: PutBucketNotificationConfigurationRequestTypeDef = {  # (1)
    "Bucket": ...,
    "NotificationConfiguration": ...,
}
parent.put_bucket_notification_configuration(**kwargs)put_bucket_ownership_controls#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").put_bucket_ownership_controls method.
 boto3 documentation
# put_bucket_ownership_controls method definition
def put_bucket_ownership_controls(
    self,
    *,
    Bucket: str,
    OwnershipControls: OwnershipControlsUnionTypeDef,  # (1)
    ContentMD5: str = ...,
    ExpectedBucketOwner: str = ...,
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (2)
) -> EmptyResponseMetadataTypeDef:  # (3)
    ...# put_bucket_ownership_controls method usage example with argument unpacking
kwargs: PutBucketOwnershipControlsRequestTypeDef = {  # (1)
    "Bucket": ...,
    "OwnershipControls": ...,
}
parent.put_bucket_ownership_controls(**kwargs)put_bucket_policy#
Applies an Amazon S3 bucket policy to an Amazon S3 bucket.
Type annotations and code completion for boto3.client("s3").put_bucket_policy method.
 boto3 documentation
# put_bucket_policy method definition
def put_bucket_policy(
    self,
    *,
    Bucket: str,
    Policy: str,
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (1)
    ConfirmRemoveSelfBucketAccess: bool = ...,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...# put_bucket_policy method usage example with argument unpacking
kwargs: PutBucketPolicyRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Policy": ...,
}
parent.put_bucket_policy(**kwargs)put_bucket_replication#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").put_bucket_replication method.
 boto3 documentation
# put_bucket_replication method definition
def put_bucket_replication(
    self,
    *,
    Bucket: str,
    ReplicationConfiguration: ReplicationConfigurationUnionTypeDef,  # (1)
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (2)
    Token: str = ...,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (3)
    ...# put_bucket_replication method usage example with argument unpacking
kwargs: PutBucketReplicationRequestTypeDef = {  # (1)
    "Bucket": ...,
    "ReplicationConfiguration": ...,
}
parent.put_bucket_replication(**kwargs)put_bucket_request_payment#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").put_bucket_request_payment method.
 boto3 documentation
# put_bucket_request_payment method definition
def put_bucket_request_payment(
    self,
    *,
    Bucket: str,
    RequestPaymentConfiguration: RequestPaymentConfigurationTypeDef,  # (1)
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (2)
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (3)
    ...# put_bucket_request_payment method usage example with argument unpacking
kwargs: PutBucketRequestPaymentRequestTypeDef = {  # (1)
    "Bucket": ...,
    "RequestPaymentConfiguration": ...,
}
parent.put_bucket_request_payment(**kwargs)put_bucket_tagging#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").put_bucket_tagging method.
 boto3 documentation
# put_bucket_tagging method definition
def put_bucket_tagging(
    self,
    *,
    Bucket: str,
    Tagging: TaggingTypeDef,  # (1)
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (2)
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (3)
    ...# put_bucket_tagging method usage example with argument unpacking
kwargs: PutBucketTaggingRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Tagging": ...,
}
parent.put_bucket_tagging(**kwargs)put_bucket_versioning#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").put_bucket_versioning method.
 boto3 documentation
# put_bucket_versioning method definition
def put_bucket_versioning(
    self,
    *,
    Bucket: str,
    VersioningConfiguration: VersioningConfigurationTypeDef,  # (1)
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (2)
    MFA: str = ...,
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (3)
    ...# put_bucket_versioning method usage example with argument unpacking
kwargs: PutBucketVersioningRequestTypeDef = {  # (1)
    "Bucket": ...,
    "VersioningConfiguration": ...,
}
parent.put_bucket_versioning(**kwargs)put_bucket_website#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").put_bucket_website method.
 boto3 documentation
# put_bucket_website method definition
def put_bucket_website(
    self,
    *,
    Bucket: str,
    WebsiteConfiguration: WebsiteConfigurationTypeDef,  # (1)
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (2)
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (3)
    ...# put_bucket_website method usage example with argument unpacking
kwargs: PutBucketWebsiteRequestTypeDef = {  # (1)
    "Bucket": ...,
    "WebsiteConfiguration": ...,
}
parent.put_bucket_website(**kwargs)put_object#
End of support notice: As of October 1, 2025, Amazon S3 has discontinued support for Email Grantee Access Control Lists (ACLs).
Type annotations and code completion for boto3.client("s3").put_object method.
 boto3 documentation
# put_object method definition
def put_object(
    self,
    *,
    Bucket: str,
    Key: str,
    ACL: ObjectCannedACLType = ...,  # (1)
    Body: BlobTypeDef = ...,
    CacheControl: str = ...,
    ContentDisposition: str = ...,
    ContentEncoding: str = ...,
    ContentLanguage: str = ...,
    ContentLength: int = ...,
    ContentMD5: str = ...,
    ContentType: str = ...,
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (2)
    ChecksumCRC32: str = ...,
    ChecksumCRC32C: str = ...,
    ChecksumCRC64NVME: str = ...,
    ChecksumSHA1: str = ...,
    ChecksumSHA256: str = ...,
    Expires: TimestampTypeDef = ...,
    IfMatch: str = ...,
    IfNoneMatch: str = ...,
    GrantFullControl: str = ...,
    GrantRead: str = ...,
    GrantReadACP: str = ...,
    GrantWriteACP: str = ...,
    WriteOffsetBytes: int = ...,
    Metadata: Mapping[str, str] = ...,
    ServerSideEncryption: ServerSideEncryptionType = ...,  # (3)
    StorageClass: StorageClassType = ...,  # (4)
    WebsiteRedirectLocation: str = ...,
    SSECustomerAlgorithm: str = ...,
    SSECustomerKey: str | bytes = ...,
    SSEKMSKeyId: str = ...,
    SSEKMSEncryptionContext: str = ...,
    BucketKeyEnabled: bool = ...,
    RequestPayer: RequestPayerType = ...,  # (5)
    Tagging: str = ...,
    ObjectLockMode: ObjectLockModeType = ...,  # (6)
    ObjectLockRetainUntilDate: TimestampTypeDef = ...,
    ObjectLockLegalHoldStatus: ObjectLockLegalHoldStatusType = ...,  # (7)
    ExpectedBucketOwner: str = ...,
) -> PutObjectOutputTypeDef:  # (8)
    ...- See ObjectCannedACLType
- See ChecksumAlgorithmType
- See ServerSideEncryptionType
- See StorageClassType
- See RequestPayerType
- See ObjectLockModeType
- See ObjectLockLegalHoldStatusType
- See PutObjectOutputTypeDef
# put_object method usage example with argument unpacking
kwargs: PutObjectRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
}
parent.put_object(**kwargs)put_object_acl#
End of support notice: As of October 1, 2025, Amazon S3 has discontinued support for Email Grantee Access Control Lists (ACLs).
Type annotations and code completion for boto3.client("s3").put_object_acl method.
 boto3 documentation
# put_object_acl method definition
def put_object_acl(
    self,
    *,
    Bucket: str,
    Key: str,
    ACL: ObjectCannedACLType = ...,  # (1)
    AccessControlPolicy: AccessControlPolicyTypeDef = ...,  # (2)
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (3)
    GrantFullControl: str = ...,
    GrantRead: str = ...,
    GrantReadACP: str = ...,
    GrantWrite: str = ...,
    GrantWriteACP: str = ...,
    RequestPayer: RequestPayerType = ...,  # (4)
    VersionId: str = ...,
    ExpectedBucketOwner: str = ...,
) -> PutObjectAclOutputTypeDef:  # (5)
    ...- See ObjectCannedACLType
- See AccessControlPolicyTypeDef
- See ChecksumAlgorithmType
- See RequestPayerType
- See PutObjectAclOutputTypeDef
# put_object_acl method usage example with argument unpacking
kwargs: PutObjectAclRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
}
parent.put_object_acl(**kwargs)put_object_legal_hold#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").put_object_legal_hold method.
 boto3 documentation
# put_object_legal_hold method definition
def put_object_legal_hold(
    self,
    *,
    Bucket: str,
    Key: str,
    LegalHold: ObjectLockLegalHoldTypeDef = ...,  # (1)
    RequestPayer: RequestPayerType = ...,  # (2)
    VersionId: str = ...,
    ContentMD5: str = ...,
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (3)
    ExpectedBucketOwner: str = ...,
) -> PutObjectLegalHoldOutputTypeDef:  # (4)
    ...- See ObjectLockLegalHoldTypeDef
- See RequestPayerType
- See ChecksumAlgorithmType
- See PutObjectLegalHoldOutputTypeDef
# put_object_legal_hold method usage example with argument unpacking
kwargs: PutObjectLegalHoldRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
}
parent.put_object_legal_hold(**kwargs)put_object_lock_configuration#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").put_object_lock_configuration method.
 boto3 documentation
# put_object_lock_configuration method definition
def put_object_lock_configuration(
    self,
    *,
    Bucket: str,
    ObjectLockConfiguration: ObjectLockConfigurationTypeDef = ...,  # (1)
    RequestPayer: RequestPayerType = ...,  # (2)
    Token: str = ...,
    ContentMD5: str = ...,
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (3)
    ExpectedBucketOwner: str = ...,
) -> PutObjectLockConfigurationOutputTypeDef:  # (4)
    ...- See ObjectLockConfigurationTypeDef
- See RequestPayerType
- See ChecksumAlgorithmType
- See PutObjectLockConfigurationOutputTypeDef
# put_object_lock_configuration method usage example with argument unpacking
kwargs: PutObjectLockConfigurationRequestTypeDef = {  # (1)
    "Bucket": ...,
}
parent.put_object_lock_configuration(**kwargs)put_object_retention#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").put_object_retention method.
 boto3 documentation
# put_object_retention method definition
def put_object_retention(
    self,
    *,
    Bucket: str,
    Key: str,
    Retention: ObjectLockRetentionUnionTypeDef = ...,  # (1)
    RequestPayer: RequestPayerType = ...,  # (2)
    VersionId: str = ...,
    BypassGovernanceRetention: bool = ...,
    ContentMD5: str = ...,
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (3)
    ExpectedBucketOwner: str = ...,
) -> PutObjectRetentionOutputTypeDef:  # (4)
    ...- See ObjectLockRetentionUnionTypeDef
- See RequestPayerType
- See ChecksumAlgorithmType
- See PutObjectRetentionOutputTypeDef
# put_object_retention method usage example with argument unpacking
kwargs: PutObjectRetentionRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
}
parent.put_object_retention(**kwargs)put_object_tagging#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").put_object_tagging method.
 boto3 documentation
# put_object_tagging method definition
def put_object_tagging(
    self,
    *,
    Bucket: str,
    Key: str,
    Tagging: TaggingTypeDef,  # (1)
    VersionId: str = ...,
    ContentMD5: str = ...,
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (2)
    ExpectedBucketOwner: str = ...,
    RequestPayer: RequestPayerType = ...,  # (3)
) -> PutObjectTaggingOutputTypeDef:  # (4)
    ...# put_object_tagging method usage example with argument unpacking
kwargs: PutObjectTaggingRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
    "Tagging": ...,
}
parent.put_object_tagging(**kwargs)put_public_access_block#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").put_public_access_block method.
 boto3 documentation
# put_public_access_block method definition
def put_public_access_block(
    self,
    *,
    Bucket: str,
    PublicAccessBlockConfiguration: PublicAccessBlockConfigurationTypeDef,  # (1)
    ContentMD5: str = ...,
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (2)
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (3)
    ...- See PublicAccessBlockConfigurationTypeDef
- See ChecksumAlgorithmType
- See EmptyResponseMetadataTypeDef
# put_public_access_block method usage example with argument unpacking
kwargs: PutPublicAccessBlockRequestTypeDef = {  # (1)
    "Bucket": ...,
    "PublicAccessBlockConfiguration": ...,
}
parent.put_public_access_block(**kwargs)rename_object#
Renames an existing object in a directory bucket that uses the S3 Express One Zone storage class.
Type annotations and code completion for boto3.client("s3").rename_object method.
 boto3 documentation
# rename_object method definition
def rename_object(
    self,
    *,
    Bucket: str,
    Key: str,
    RenameSource: str,
    DestinationIfMatch: str = ...,
    DestinationIfNoneMatch: str = ...,
    DestinationIfModifiedSince: TimestampTypeDef = ...,
    DestinationIfUnmodifiedSince: TimestampTypeDef = ...,
    SourceIfMatch: str = ...,
    SourceIfNoneMatch: str = ...,
    SourceIfModifiedSince: TimestampTypeDef = ...,
    SourceIfUnmodifiedSince: TimestampTypeDef = ...,
    ClientToken: str = ...,
) -> Dict[str, Any]:
    ...# rename_object method usage example with argument unpacking
kwargs: RenameObjectRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
    "RenameSource": ...,
}
parent.rename_object(**kwargs)restore_object#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").restore_object method.
 boto3 documentation
# restore_object method definition
def restore_object(
    self,
    *,
    Bucket: str,
    Key: str,
    VersionId: str = ...,
    RestoreRequest: RestoreRequestTypeDef = ...,  # (1)
    RequestPayer: RequestPayerType = ...,  # (2)
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (3)
    ExpectedBucketOwner: str = ...,
) -> RestoreObjectOutputTypeDef:  # (4)
    ...- See RestoreRequestTypeDef
- See RequestPayerType
- See ChecksumAlgorithmType
- See RestoreObjectOutputTypeDef
# restore_object method usage example with argument unpacking
kwargs: RestoreObjectRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
}
parent.restore_object(**kwargs)select_object_content#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").select_object_content method.
 boto3 documentation
# select_object_content method definition
def select_object_content(
    self,
    *,
    Bucket: str,
    Key: str,
    Expression: str,
    ExpressionType: ExpressionTypeType,  # (1)
    InputSerialization: InputSerializationTypeDef,  # (2)
    OutputSerialization: OutputSerializationTypeDef,  # (3)
    SSECustomerAlgorithm: str = ...,
    SSECustomerKey: str | bytes = ...,
    RequestProgress: RequestProgressTypeDef = ...,  # (4)
    ScanRange: ScanRangeTypeDef = ...,  # (5)
    ExpectedBucketOwner: str = ...,
) -> SelectObjectContentOutputTypeDef:  # (6)
    ...- See ExpressionTypeType
- See InputSerializationTypeDef
- See OutputSerializationTypeDef
- See RequestProgressTypeDef
- See ScanRangeTypeDef
- See SelectObjectContentOutputTypeDef
# select_object_content method usage example with argument unpacking
kwargs: SelectObjectContentRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
    "Expression": ...,
    "ExpressionType": ...,
    "InputSerialization": ...,
    "OutputSerialization": ...,
}
parent.select_object_content(**kwargs)update_bucket_metadata_inventory_table_configuration#
Enables or disables a live inventory table for an S3 Metadata configuration on a general purpose bucket.
Type annotations and code completion for boto3.client("s3").update_bucket_metadata_inventory_table_configuration method.
 boto3 documentation
# update_bucket_metadata_inventory_table_configuration method definition
def update_bucket_metadata_inventory_table_configuration(
    self,
    *,
    Bucket: str,
    InventoryTableConfiguration: InventoryTableConfigurationUpdatesTypeDef,  # (1)
    ContentMD5: str = ...,
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (2)
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (3)
    ...- See InventoryTableConfigurationUpdatesTypeDef
- See ChecksumAlgorithmType
- See EmptyResponseMetadataTypeDef
# update_bucket_metadata_inventory_table_configuration method usage example with argument unpacking
kwargs: UpdateBucketMetadataInventoryTableConfigurationRequestTypeDef = {  # (1)
    "Bucket": ...,
    "InventoryTableConfiguration": ...,
}
parent.update_bucket_metadata_inventory_table_configuration(**kwargs)update_bucket_metadata_journal_table_configuration#
Enables or disables journal table record expiration for an S3 Metadata configuration on a general purpose bucket.
Type annotations and code completion for boto3.client("s3").update_bucket_metadata_journal_table_configuration method.
 boto3 documentation
# update_bucket_metadata_journal_table_configuration method definition
def update_bucket_metadata_journal_table_configuration(
    self,
    *,
    Bucket: str,
    JournalTableConfiguration: JournalTableConfigurationUpdatesTypeDef,  # (1)
    ContentMD5: str = ...,
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (2)
    ExpectedBucketOwner: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (3)
    ...- See JournalTableConfigurationUpdatesTypeDef
- See ChecksumAlgorithmType
- See EmptyResponseMetadataTypeDef
# update_bucket_metadata_journal_table_configuration method usage example with argument unpacking
kwargs: UpdateBucketMetadataJournalTableConfigurationRequestTypeDef = {  # (1)
    "Bucket": ...,
    "JournalTableConfiguration": ...,
}
parent.update_bucket_metadata_journal_table_configuration(**kwargs)upload_part#
Uploads a part in a multipart upload.
Type annotations and code completion for boto3.client("s3").upload_part method.
 boto3 documentation
# upload_part method definition
def upload_part(
    self,
    *,
    Bucket: str,
    Key: str,
    PartNumber: int,
    UploadId: str,
    Body: BlobTypeDef = ...,
    ContentLength: int = ...,
    ContentMD5: str = ...,
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (1)
    ChecksumCRC32: str = ...,
    ChecksumCRC32C: str = ...,
    ChecksumCRC64NVME: str = ...,
    ChecksumSHA1: str = ...,
    ChecksumSHA256: str = ...,
    SSECustomerAlgorithm: str = ...,
    SSECustomerKey: str | bytes = ...,
    RequestPayer: RequestPayerType = ...,  # (2)
    ExpectedBucketOwner: str = ...,
) -> UploadPartOutputTypeDef:  # (3)
    ...# upload_part method usage example with argument unpacking
kwargs: UploadPartRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
    "PartNumber": ...,
    "UploadId": ...,
}
parent.upload_part(**kwargs)upload_part_copy#
Uploads a part by copying data from an existing object as data source.
Type annotations and code completion for boto3.client("s3").upload_part_copy method.
 boto3 documentation
# upload_part_copy method definition
def upload_part_copy(
    self,
    *,
    Bucket: str,
    CopySource: CopySourceOrStrTypeDef,  # (1)
    Key: str,
    PartNumber: int,
    UploadId: str,
    CopySourceIfMatch: str = ...,
    CopySourceIfModifiedSince: TimestampTypeDef = ...,
    CopySourceIfNoneMatch: str = ...,
    CopySourceIfUnmodifiedSince: TimestampTypeDef = ...,
    CopySourceRange: str = ...,
    SSECustomerAlgorithm: str = ...,
    SSECustomerKey: str | bytes = ...,
    CopySourceSSECustomerAlgorithm: str = ...,
    CopySourceSSECustomerKey: str | bytes = ...,
    RequestPayer: RequestPayerType = ...,  # (2)
    ExpectedBucketOwner: str = ...,
    ExpectedSourceBucketOwner: str = ...,
) -> UploadPartCopyOutputTypeDef:  # (3)
    ...# upload_part_copy method usage example with argument unpacking
kwargs: UploadPartCopyRequestTypeDef = {  # (1)
    "Bucket": ...,
    "CopySource": ...,
    "Key": ...,
    "PartNumber": ...,
    "UploadId": ...,
}
parent.upload_part_copy(**kwargs)write_get_object_response#
This operation is not supported for directory buckets.
Type annotations and code completion for boto3.client("s3").write_get_object_response method.
 boto3 documentation
# write_get_object_response method definition
def write_get_object_response(
    self,
    *,
    RequestRoute: str,
    RequestToken: str,
    Body: BlobTypeDef = ...,
    StatusCode: int = ...,
    ErrorCode: str = ...,
    ErrorMessage: str = ...,
    AcceptRanges: str = ...,
    CacheControl: str = ...,
    ContentDisposition: str = ...,
    ContentEncoding: str = ...,
    ContentLanguage: str = ...,
    ContentLength: int = ...,
    ContentRange: str = ...,
    ContentType: str = ...,
    ChecksumCRC32: str = ...,
    ChecksumCRC32C: str = ...,
    ChecksumCRC64NVME: str = ...,
    ChecksumSHA1: str = ...,
    ChecksumSHA256: str = ...,
    DeleteMarker: bool = ...,
    ETag: str = ...,
    Expires: TimestampTypeDef = ...,
    Expiration: str = ...,
    LastModified: TimestampTypeDef = ...,
    MissingMeta: int = ...,
    Metadata: Mapping[str, str] = ...,
    ObjectLockMode: ObjectLockModeType = ...,  # (1)
    ObjectLockLegalHoldStatus: ObjectLockLegalHoldStatusType = ...,  # (2)
    ObjectLockRetainUntilDate: TimestampTypeDef = ...,
    PartsCount: int = ...,
    ReplicationStatus: ReplicationStatusType = ...,  # (3)
    RequestCharged: RequestChargedType = ...,  # (4)
    Restore: str = ...,
    ServerSideEncryption: ServerSideEncryptionType = ...,  # (5)
    SSECustomerAlgorithm: str = ...,
    SSEKMSKeyId: str = ...,
    StorageClass: StorageClassType = ...,  # (6)
    TagCount: int = ...,
    VersionId: str = ...,
    BucketKeyEnabled: bool = ...,
) -> EmptyResponseMetadataTypeDef:  # (7)
    ...- See ObjectLockModeType
- See ObjectLockLegalHoldStatusType
- See ReplicationStatusType
- See RequestChargedType
- See ServerSideEncryptionType
- See StorageClassType
- See EmptyResponseMetadataTypeDef
# write_get_object_response method usage example with argument unpacking
kwargs: WriteGetObjectResponseRequestTypeDef = {  # (1)
    "RequestRoute": ...,
    "RequestToken": ...,
}
parent.write_get_object_response(**kwargs)copy#
Copy an object from one S3 location to another.
Type annotations and code completion for boto3.client("s3").copy method.
 boto3 documentation
# copy method definition
def copy(
    self,
    CopySource: CopySourceTypeDef,  # (1)
    Bucket: str,
    Key: str,
    ExtraArgs: Dict[str, Any] | None = ...,
    Callback: Callable[..., Any] | None = ...,
    SourceClient: botocore.client.BaseClient | None = ...,
    Config: boto3.s3.transfer.TransferConfig | None = ...,
) -> None:
    ...# copy method usage example with argument unpacking
kwargs: ClientCopyRequestTypeDef = {  # (1)
    "CopySource": ...,
    "Bucket": ...,
    "Key": ...,
}
parent.copy(**kwargs)download_file#
Download an object from S3 to a file.
Type annotations and code completion for boto3.client("s3").download_file method.
 boto3 documentation
# download_file method definition
def download_file(
    self,
    Bucket: str,
    Key: str,
    Filename: str,
    ExtraArgs: Dict[str, Any] | None = ...,
    Callback: Callable[..., Any] | None = ...,
    Config: boto3.s3.transfer.TransferConfig | None = ...,
) -> None:
    ...# download_file method usage example with argument unpacking
kwargs: ClientDownloadFileRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
    "Filename": ...,
}
parent.download_file(**kwargs)download_fileobj#
Download an object from S3 to a file-like object.
Type annotations and code completion for boto3.client("s3").download_fileobj method.
 boto3 documentation
# download_fileobj method definition
def download_fileobj(
    self,
    Bucket: str,
    Key: str,
    Fileobj: FileobjTypeDef,
    ExtraArgs: Dict[str, Any] | None = ...,
    Callback: Callable[..., Any] | None = ...,
    Config: boto3.s3.transfer.TransferConfig | None = ...,
) -> None:
    ...# download_fileobj method usage example with argument unpacking
kwargs: ClientDownloadFileobjRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
    "Fileobj": ...,
}
parent.download_fileobj(**kwargs)generate_presigned_post#
Generate a presigned URL for POST requests.
Type annotations and code completion for boto3.client("s3").generate_presigned_post method.
 boto3 documentation
# generate_presigned_post method definition
def generate_presigned_post(
    self,
    Bucket: str,
    Key: str,
    Fields: Dict[str, Any] | None = ...,
    Conditions: List[Any] | Dict[str, Any] | None = ...,
    ExpiresIn: int = 3600,
) -> Dict[str, Any]:
    ...# generate_presigned_post method usage example with argument unpacking
kwargs: ClientGeneratePresignedPostRequestTypeDef = {  # (1)
    "Bucket": ...,
    "Key": ...,
}
parent.generate_presigned_post(**kwargs)upload_file#
Upload a file to S3.
Type annotations and code completion for boto3.client("s3").upload_file method.
 boto3 documentation
# upload_file method definition
def upload_file(
    self,
    Filename: str,
    Bucket: str,
    Key: str,
    ExtraArgs: Dict[str, Any] | None = ...,
    Callback: Callable[..., Any] | None = ...,
    Config: boto3.s3.transfer.TransferConfig | None = ...,
) -> None:
    ...# upload_file method usage example with argument unpacking
kwargs: ClientUploadFileRequestTypeDef = {  # (1)
    "Filename": ...,
    "Bucket": ...,
    "Key": ...,
}
parent.upload_file(**kwargs)upload_fileobj#
Upload a file-like object to S3.
Type annotations and code completion for boto3.client("s3").upload_fileobj method.
 boto3 documentation
# upload_fileobj method definition
def upload_fileobj(
    self,
    Fileobj: FileobjTypeDef,
    Bucket: str,
    Key: str,
    ExtraArgs: Dict[str, Any] | None = ...,
    Callback: Callable[..., Any] | None = ...,
    Config: boto3.s3.transfer.TransferConfig | None = ...,
) -> None:
    ...# upload_fileobj method usage example with argument unpacking
kwargs: ClientUploadFileobjRequestTypeDef = {  # (1)
    "Fileobj": ...,
    "Bucket": ...,
    "Key": ...,
}
parent.upload_fileobj(**kwargs)get_paginator#
Type annotations and code completion for boto3.client("s3").get_paginator method with overloads.
- client.get_paginator("list_buckets")-> ListBucketsPaginator
- client.get_paginator("list_directory_buckets")-> ListDirectoryBucketsPaginator
- client.get_paginator("list_multipart_uploads")-> ListMultipartUploadsPaginator
- client.get_paginator("list_object_versions")-> ListObjectVersionsPaginator
- client.get_paginator("list_objects")-> ListObjectsPaginator
- client.get_paginator("list_objects_v2")-> ListObjectsV2Paginator
- client.get_paginator("list_parts")-> ListPartsPaginator
get_waiter#
Type annotations and code completion for boto3.client("s3").get_waiter method with overloads.
- client.get_waiter("bucket_exists")-> BucketExistsWaiter
- client.get_waiter("bucket_not_exists")-> BucketNotExistsWaiter
- client.get_waiter("object_exists")-> ObjectExistsWaiter
- client.get_waiter("object_not_exists")-> ObjectNotExistsWaiter