Method to download object from AWS S3 for use in Android app?

Viewed 988

I am running a scheduled python script on an EC2 instance which creates and exports a JSON file to my S3 bucket for a backend. I am hitting a brick wall attempting to download the JSON file for use in an android application. The AWS mobile SDK documentation suggests the mobile SDK is depreciated in favor of AWS Amplify, but Amplify seems to be overkill for this simple backend connection, and attempts to integrate it for my project are proving nightmareish.

Is there a simple way to download from S3 using an android HTTPS request library, or should I be using a different resource for backend storage entirely? Or is the correct route to continue working to use the Amplify suite to make the connection?

2 Answers

You could use an AsyncTask to run your HTTP Request and download the file from S3.

Have a look at Android: AsyncTask to make an HTTP GET Request?

Be sure to check the permissions on the S3 side to ensure you allow for the download to happen.

Related