You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, how do I use boto3 with multi-tenancy on Ceph S3?
The following fails:
importboto3frombotocore.configimportConfig# Define the custom configuration to use path-style addressingconfig=Config(
s3={
'addressing_style': 'path'# Force path-style addressing
}
)
# Create the S3 client with the endpoint URL for Cephs3_client=boto3.client(
's3',
aws_access_key_id="TESTER",
aws_secret_access_key="test123",
endpoint_url="http://ep.host.dom/", # Replace with your Ceph endpointconfig=config
)
# Specify the bucket name including the tenantbucket_name="tenant:bucketname"# Example: List objects in the bucketresponse=s3_client.list_objects_v2(Bucket=bucket_name)
# Print the objects in the bucketforobjinresponse.get('Contents', []):
print(obj['Key'])
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, how do I use boto3 with multi-tenancy on Ceph S3?
The following fails:
with the following error:
Link to the ceph docs:
https://docs.ceph.com/en/latest/radosgw/multitenancy/
Beta Was this translation helpful? Give feedback.
All reactions