20.09.2019
Posted by 
Amazon s3 api documentation

1 Create an instance of the AmazonS3Client class. 2 Initiate multipart upload by executing the AmazonS3Client.initiateMultipartUpload method. You will need to provide the required information, i.e., bucket name and key name, to initiate the multipart upload by creating an instance of the InitiateMultipartUploadRequestclass. 3 Save the upload ID that the AmazonS3Client.initiateMultipartUpload method returns.

Get temporary access credentials to support uploading to S3 directly using JavaScript SDK from browser. Using AWS SDK for STS assume an IAM Role that has access to S3. This returns a set of temporary security credentials (consisting of an access key ID, a secret access key, and a security token) that needs to be return to the browser. A single upload object size limit is up to 5GB, so if the file you wanted to upload to S3 is larger than 5GB, you will have to use multipart upload API to break it up. Individual Amazon S3 objects can range in size from a minimum of 0 bytes to a maximum of 5 terabytes. The largest object that can be uploaded in a single PUT.

You will need to provide this upload ID for each subsequent multipart upload operation. 4 Upload parts. For each part upload, execute the AmazonS3Client.uploadPart method. You need to provide part upload information, such as upload ID, bucket name, and the part number. You provide this information by creating an instance of the UploadPartRequest class. 5 Save the response of the AmazonS3Client.uploadPart method in a list.

Amazon S3 File Upload Api Certifications

Amazon S3 File Upload Api Certification

This response includes the ETag value and the part number you will need to complete the multipart upload. 6 Repeat tasks 4 and 5 for each part. 7 Execute the AmazonS3Client.completeMultipartUpload method to complete the multipart upload. The following Java code sample demonstrates the preceding tasks.