Upload an image from Android to Amazon S3

0 votes

I need to upload a bitmap to Amazon S3. Can you point to me to a source of reference that explains how to push a file to S3, and get a URL reference in return?

More specifically: - Where do the credentials go when using the S3 Android SDK? - Do I need to create a bucket before uploading a file, or can they exist outside buckets? - Which SDK method do I use to push a bitmap up to S3? - Am I right in thinking I need the CORE and S3 libs to do what I need, and no others?

Sep 21, 2018 in AWS by datageek
• 2,540 points
5,086 views

1 answer to this question.

0 votes

Take a look at the Amazon S3 API documentation to get a feel for what can and can't be done with Amazon S3. Note that there are two APIs, a simpler REST API and a more-involved SOAP API.

You can write your own code to make HTTP requests to interact with the REST API, or use a SOAP library to consume the SOAP API.

Fortunately for Android developers, Amazon has released a (Beta) SDK that does all of this work for you. There's a Getting Started guide and Javadocs too. With this SDK you should be able to integrate S3 with your application in a matter of hours.

The Getting Started guide comes with a full sample and shows how to supply the required credentials.

Conceptually, Amazon S3 stores data in Buckets where a bucket contains Objects. Generally, you'll use one bucket per application, and add as many objects as you like. S3 doesn't support or have any concept of folders, but you can put slashes (/) in your object names.

Source is Stackoverflowhttps://stackoverflow.com/questions/7310112/upload-an-image-from-android-to-amazon-s3

answered Sep 21, 2018 by Archana
• 4,170 points

edited Aug 8, 2019 by Archana

Related Questions In AWS

0 votes
0 answers

Broken image from image upload to Amazon s3 via base64 string

Feb 18, 2022 in AWS by Rahul
• 2,080 points
1,500 views
0 votes
1 answer

Upload images from local machine to Amazon S3

There's a nice example in the aws-mobile-react-native-starter repo.  You just ...READ MORE

answered Jan 16, 2019 in AWS by disha
2,549 views
0 votes
1 answer

Trying to upload data stream in Amazon S3

Try adding the ContentType & ACL in ...READ MORE

answered Jun 28, 2018 in AWS by Cloud gunner
• 4,670 points
2,541 views
0 votes
1 answer

How to copy .csv file from Amazon S3 bucket?

Boto3 is the library to use for ...READ MORE

answered Jul 6, 2018 in AWS by Priyaj
• 58,100 points
2,083 views
0 votes
1 answer
+3 votes
6 answers

How to move files from amazon ec2 to s3 bucket using command line

Hey, 3 ways you can do this: To ...READ MORE

answered Oct 9, 2018 in AWS by Omkar
• 69,220 points
19,957 views
0 votes
1 answer

How to delete events from an Amazon SQS?

I'm assuming that you don't care about ...READ MORE

answered Sep 21, 2018 in AWS by Archana
• 4,170 points
864 views
0 votes
1 answer

How to safely upgrade an Amazon EC2 instance from t1.micro to large?

Using AWS Management Console: Right-Click on the instance Instance ...READ MORE

answered Oct 8, 2018 in AWS by Priyaj
• 58,100 points
1,101 views
0 votes
1 answer

How to upload an object into Amazon S3 in Lambda?

I suspect you are calling the context.done() function before s3.upload() has ...READ MORE

answered Sep 27, 2018 in AWS by Archana
• 4,170 points
1,170 views
0 votes
1 answer

How to upload a file to Amazon S3 without passing it my server?

This article pretty much explains the entire ...READ MORE

answered Aug 14, 2018 in AWS by Archana
• 4,170 points
3,238 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP