|
QuickStart
How to get started as fast as possible
Quick Start1. Sign up for Amazon Web Services2. Get your Access Key ID and Secret Access Key3. Ensure you are using a recent JDK
4. Setup your Maven pom to include jclouds-s3 <repositories>
<repository>
<id>jclouds</id>
<url>http://jclouds.googlecode.com/svn/repo</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-s3</artifactId>
<version>1.0-beta-2</version>
</dependency>
</dependencies>5. Start coding S3Context context = S3ContextFactory.createS3Context(accesskeyid,secretkey);
// Approach 1: Map - Treat your S3Bucket like a regular map and no jclouds classes involved
Map<String, InputStream> map = context.createInputStreamMap("mybucket");
// Approach 2: Map Pro - Use S3Object to have simplicity of a map, but also access to S3 metadata
Map<String, S3Object> map = context.createS3ObjectMap("mybucket");
// Approach 3: Expert - Use JClouds api where all commands return Future<Result>
S3Connection connection = context.getConnection();
context.close();
|
Sign in to add a comment