Skip to Content
Hybrid Cloud for Developers
book

Hybrid Cloud for Developers

by Manoj Hirway
April 2018
Intermediate to advanced content levelIntermediate to advanced
280 pages
8h 37m
English
Packt Publishing
Content preview from Hybrid Cloud for Developers

Uploading files to the S3 bucket

The real use case of the S3 storage is the ability to upload and download files. Each S3 object or file has the important attributes: data, a key, and metadata. The key (or key name) is a unique identification of the object in the bucket. Object metadata is a set of name-value pairs that can be set at the time of uploading the file and can be used for several purposes. This metadata cannot be modified after the object is uploaded.

Let's understand how we can upload a file object programmatically. We will write another function that uploads a file to the packt-pub S3 bucket.

Add the following function to your program and invoke it from the main function:

 static void uploadfile() {    try    { IAmazonS3 s3Client ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hybrid Cloud for Architects

Hybrid Cloud for Architects

Alok Shrivastwa
OpenStack: Building a Cloud Environment

OpenStack: Building a Cloud Environment

Alok Shrivastwa, Sunil Sarat, Kevin Jackson, Cody Bunch, Egle Sigler, Tony Campbell

Publisher Resources

ISBN: 9781788830874Supplemental Content