Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to use POSTMAN app to upload FILES to Amazon S3

I have a rather simple task. I want to test uploading a file using Postman to my Amazon s3 bucket. Postman keeps erroring out saying "Could not get any response". Screenshot of my Postman configuration is below... any ideas why I can't do a simple upload to S3? (yes my signing credentials are correct)

enter image description here

like image 493
Rees Avatar asked Jul 15 '15 04:07

Rees


2 Answers

I know this is an old post but just in case someone got stuck in the same issue.

In your screenshot the second reason for the issue might be the SSL and it is the issue. I don't know why; but AWS is providing S3 objects with self-signed SSL certificates and this is blocked by the chrome browser. If you copy the URL from postman to the browser it will be something like that.

enter image description here

following this blog post from postman here will solve the issue depending on your OS.

Summing up the solution for windows (other platforms on the blog link):

  1. Copy the URL into the chrome browser and proceed anyway.
  2. Click on the lock icon at beside link and save the certificate.

enter image description here

  1. Go to Chrome > Settings, search for SSL (chrome://settings/search#ssl) and click on Manage certificates.

enter image description here

  1. Import the certificate and restart both chrome and postman

enter image description here

  1. Use the link again in Postman and it will work.
like image 122
Ahmed Hassanien Avatar answered Oct 04 '22 13:10

Ahmed Hassanien


Follow this article: https://medium.com/@christinavhastenrath/testing-file-uploads-to-aws-s3-with-iam-user-credentials-in-postman-5026fbde3ca6

Note: Add authorization data to to Request URL in authoriztion.

like image 42
Farhan Avatar answered Oct 04 '22 15:10

Farhan