OCI Object Storage: Unexpected 403 Forbidden scenarios When Uploading Large Files with Python SDK
I'm performance testing and I've been researching this but I'm experiencing a frustrating scenario while trying to upload large files (over 100MB) to OCI Object Storage using the Python SDK... The upload works perfectly for smaller files, but when I attempt to upload larger files, I receive a `403 Forbidden` behavior. The behavior message states: `403 Forbidden: The request is not authorized`. I have verified that my API key and secret are correctly configured, and I am using the latest version of the OCI SDK (2.40.0). Hereβs a snippet of the code I am using to handle the upload: ```python import oci from oci.object_storage.models import CreateBucketDetails config = oci.config.from_file() # Load config from ~/.oci/config object_storage_client = oci.object_storage.ObjectStorageClient(config) namespace = object_storage_client.get_namespace().data bucket_name = 'my_bucket' large_file_path = 'path/to/large_file.zip' # Create bucket if it doesn't exist try: object_storage_client.get_bucket(namespace, bucket_name) except oci.exceptions.ServiceError as e: if e.status == 404: create_bucket_details = CreateBucketDetails(name=bucket_name) object_storage_client.create_bucket(namespace, create_bucket_details) # Uploading large file with open(large_file_path, 'rb') as f: response = object_storage_client.put_object(namespace, bucket_name, 'large_file.zip', f) print('Upload response:', response) ``` I've ensured that the IAM policies allow the necessary permissions for object storage actions. Here is the relevant policy I applied: ```text Allow group my_group to manage objects in compartment my_compartment ``` Despite these settings, the upload fails consistently for large files. I suspect there might be additional configuration required for handling large uploads. Is there a specific limit or setting in OCI that I might be missing? Any insights or workarounds would be greatly appreciated. Could someone point me to the right documentation? This is happening in both development and production on Linux. Any ideas how to fix this?