Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Download a file (.bin file) from non public S3 bucket

I want to perform an OTA on a ESP32 device, the firmware is stored in an AWS S3 bucket. The download works when I’ve set the bucket permission to public (uncheck "Block public access"). However I would like to keep my bucket private and still be able to download the binary. For now I’ve root access to the bucket.

How can I do this?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

It appears your requirement is to download a private object from Amazon S3 from a device that does not have a set of AWS credentials.

This can be done by using an Amazon S3 pre-signed URL, which is a time-limited URL that provides temporary access to a private object.

The flow would be:

  • The ESP32 device would authenticate to a backend
  • A backend would verify that the user is authorized to access the object
  • It would then generate the Pre-signed URL and provide it to the ESP32 device (somehow)
  • The ESP32 device then uses the Pre-signed URL to download the object
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading