Connect by using Virtual Host Addressing
The CSO API supports Virtual Host Addressing of buckets. To provide access, use a domain name and not an IP address for the Accesser node.
The bucket name is determined by the virtual subdomain that is used to connect to the service.
To use Virtual Host Addressing with a system, do the following steps.
- Configure their DNS servers properly to perform proper routing of virtual host style addresses to the appropriate Accesser node or load balancer IP address.
- Configure an S3 Virtual Host Suffix in the Manager Web Interface for each
Access Pool that is used to service Virtual Host Addressing requests.Note: See Create Access Pool in the Manager Administration Guide for more details on setting this parameter in a Storage Pool.
Example - Using a domain name for Virtual Host
Addressing.
The Virtual Subdomain is determined by the bucket name.
s3 = boto.connect_s3(
aws_access_key_id = access_key,
aws_secret_access_key = secret_key,
host=somedomain.com 1
is_secure = self.is_secure,
calling_format=boto.s3.connection.SubdomainCallingFormat() 2
)
1 User can use http://bucketname.somedomain.com/ to access the bucket bucketname.
bucketname is the S3 virtual host suffix.
2 The connection method (calling_format) for Resource Host Addressing is SubdomainCallingFormat().