--- title: "Configure Bucket Logging" slug: "configure-bucket-logging-boto3-tg" tags: ["5.4"] updated: 2026-10-28T01:54:23Z published: 2026-10-28T01:54:23Z canonical: "docs.vastdata.com/configure-bucket-logging-boto3-tg" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.vastdata.com/llms.txt > Use this file to discover all available pages before exploring further. # Configure Bucket Logging Use the [put_bucket_logging()](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3/client/put_bucket_logging.html) method to configure bucket logging. The following example enables logging to a destination bucket named `c-2024-10-10-112417-595579`, where the log object keys will have a prefix of `-V/E-Test-`. Users with emails `myuser@example.com` and `onemoreuser@example.com` will have full control permissions to the log objects. ```plaintext s3.client.put_bucket_logging(    Bucket=bucket_name,    BucketLoggingStatus={        'LoggingEnabled': {            'TargetBucket': 'c-2024-10-10-112417-595579', 'TargetPrefix': '-V/E-Test-', 'TargetGrants':                 [{'Grantee': {'Type':'AmazonCustomerByEmail', 'EmailAddress': 'myuser@example.com'}, 'Permission': 'FULL_CONTROL'},                 {'Grantee': {'Type': 'AmazonCustomerByEmail', 'EmailAddress':'onemoreuser@example.com'}, 'Permission': 'FULL_CONTROL'}]        }    } ) ```