View Javadoc
1   package com.github.davidmoten.aws.lw.client;
2   
3   import java.io.File;
4   
5   public class MultipartMain {
6   
7       public static void main(String[] args) {
8           String regionName = "ap-southeast-2";
9           String accessKey = System.getProperty("accessKey");
10          String secretKey = System.getProperty("secretKey");
11  
12          Credentials credentials = Credentials.of(accessKey, secretKey);
13          Client sqs = Client //
14                  .sqs() //
15                  .region(regionName) //
16                  .credentials(credentials) //
17                  .build();
18          Client s3 = Client.s3().from(sqs).build();
19  
20          Multipart //
21                  .s3(s3) //
22                  .bucket("moten-fixes") //
23                  .key("part001.json") //
24                  .upload(new File("/home/dave/part001.json"));
25          System.out.println("completed upload");
26      }
27  
28  }