...
- Get CloudStack running on the latest 3.0.x series
- Enable the S3 API by setting the flag enable.s3.api to 'true' in the configuration table. This can be done through the UI or directly in MySQL:
update configuration set value='true' where name='enable.s3.api'; - Choose a local filesystem path where the objects will be stored. We can mount an NFS store or use the local filesystem. E.g,:
- mkdir -p /mnt/s3
- Ensure that the 'cloud' user can write to this directory ##Edit
- Edit the file $TOMCAT_HOME/conf/cloud-bridge.properties:
- host=http://localhost:8080/awsapi
![](/confluence/images/icons/linkext7.gif)
storage.multipartDir=_multipartuploads_
bucket.dns=false
storage.root=<mount point or filesystem path>
serviceEndpoint=localhost:8080
- Restart CloudStack.
- Obtain API and secret keys for a user (available in the Admin ui under Accounts -> Users)
- CloudStack Api key = this is the same as the AWS access key id
- CloudStack Secret key = this is the same as the AWS secret access key
- Generate a private key and a self-signed X.509 certificate. Substitute your own desired storage location for /path/to/… below.
- $ openssl req -x509 -nodes -days 365 -newkey rsa:2048 <http://rsa:2048/
> -keyout /path/to/private_key.pem -out /path/to/cert.pem
- Register the mapping from the X.509 certificate to your accounts API keys with CloudStack.
- $ cloudstack-aws-api-register --apikey=<User’s Cloudstack API key> --secretkey=<User’s CloudStack Secret key> --cert=</path/to/cert.pem> --url=http://<cloudstack-server>:8080/awsapi/rest/AmazonS3
- Configure the boto S3Connection object as follows:
...
{"serverDuration": 167, "requestCorrelationId": "ba25db8d2c364029"}