Rank 1: Thread
The docs mention that the HeadObject request is supported, but when I try to call it, I’m getting a 403 error. I’ve tried it with both boto3 and the AWS CLI, and I’m seeing the same issue with both.
import boto3from botocore.config import Configcreds = {}# 1. Initialize your client with explicit S3 settingsclient = boto3.client( 's3', # For Appwrite Cloud use 'https://appwrite.io' # For Self-hosted use 'https://YOUR_HOST/v1/s3' endpoint_url=creds.get("endpoint_url"), # Credentials mapping for Appwrite aws_access_key_id=creds.get("aws_access_key_id"), aws_secret_access_key=creds.get("aws_secret_access_key"), # Must use 'us-east-1' (or a placeholder) so signature signing operates correctly region_name=creds.get("region_name"), # CRITICAL: Force path-style addressing and require standard SigV4 signing config=Config( s3={'addressing_style': 'path'}, signature_version='s3v4' ))
# 2. Test your calltry: # In Appwrite, 'Bucket' is your Appwrite Bucket ID, 'Key' is your File ID response = client.head_object(Bucket="bucketname", Key="filename.json") print("Success:", response)except Exception as e: print("Error:", e)An error occurred (403) when calling the HeadObject operation: Forbidden