http://docs.aws.amazon.com/AmazonS3/latest/dev/ShareObjectPreSignedURL.html
https://github.com/kbastani/spring-boot-starter-amazon-s3
http://stackoverflow.com/questions/41951978/amazons3clientcredentials-is-deprecated
All objects by default are private. Only the object owner has permission to access these objects. However, the object owner can optionally share objects with others by creating a pre-signed URL, using their own security credentials, to grant time-limited permission to download the objects.
When you create a pre-signed URL for your object, you must provide your security credentials, specify a bucket name, an object key, specify the HTTP method (GET to download the object) and expiration date and time. The pre-signed URLs are valid only for the specified duration.
Anyone who receives the pre-signed URL can then access the object.
http://docs.aws.amazon.com/AmazonS3/latest/dev/PresignedUrlUploadObject.html
A pre-signed URL gives you access to the object identified in the URL, provided that the creator of the pre-signed URL has permissions to access that object. That is, if you receive a pre-signed URL to upload an object, you can upload the object only if the creator of the pre-signed URL has the necessary permissions to upload that object.
All objects and buckets by default are private. The pre-signed URLs are useful if you want your user/customer to be able upload a specific object to your bucket, but you don't require them to have AWS security credentials or permissions
https://github.com/kbastani/spring-boot-starter-amazon-s3
AmazonS3 s3Client = AmazonS3ClientBuilder.standard() .withCredentials(new EnvironmentVariableCredentialsProvider()) .build();
http://stackoverflow.com/questions/41951978/amazons3clientcredentials-is-deprecated
You can either use AmazonS3ClientBuilder or AwsClientBuilder as alternatives.
For S3, simplest would be with AmazonS3ClientBuilder,
BasicAWSCredentials creds = new BasicAWSCredentials("access_key", "secret_key");
AmazonS3 s3Client = AmazonS3ClientBuilder.standard().withCredentials(new AWSStaticCredentialsProvider(creds)).build();
http://stackoverflow.com/questions/8303011/how-to-check-if-a-specified-key-exists-in-a-given-s3-bucket-using-java
There's now a doesObjectExist method in the official Java API.