This project provides a Spring Cloud service connector for Amazon S3 services brokered by the Cloud Foundry s3-cf-service-broker.
Add the library to your project:
<dependency>
<groupId>org.cloudfoundry.community</groupId>
<artifactId>spring-cloud-s3-service-connector</artifactId>
<version>1.0.0</version>
</dependency>
Bind an S3 service to your Cloud Foundry application.
Use Spring Cloud to get an S3ServiceInfo
instance.
CloudFactory cloudFactory = new CloudFactory();
Cloud cloud = cloudFactory.getCloud();
S3ServiceInfo serviceInfo = (S3ServiceInfo) cloud.getServiceInfo("my-s3-service");
... serviceInfo.getAccessKeyId();
... serviceInfo.getSecretAccessKey();
... serviceInfo.getBucket();
The CI server for the project is hosted at https://gaptap.atlassian.net/builds/browse/CFC-SPRIN.