Http Get Request to Presigned S3 URL

Is there anyway to make a successful get request to a presigned s3 url (one not ending in the file extension)? Normal public S3 URLs work without issue to request a file, however dealing with presigned URLs always gives a 403 error.

When you pre-sign an S3 file, you have to provide an expiration time. If you do not provide one, the default expiration time is 3600 seconds (1 hour). Is it possible that the pre-signed S3 URL is expired hence the reason you are getting 403?

No, the time is not expired. I can drop the URL in postman on a GET request and it returns the file (in this case a pdf). However, trying to make the same GET request in N8N I get a 403 error.

Update: The S3 link is a gov cloud link. Tried another S3 presigned url (non gov cloud) and it works as expected. Wonder if something is different because it’s a gov cloud s3 link? Although it still works fine in postman.

Format is:"000431-EXAMPLE .pdf%22&AWSAccessKeyId=NOTREALKEY&Signature=DBV5CHyjl%2Fw%2Fuy6sv%2BwX6vAcyTc%3D&Expires=1636242558

Is it possible that postman is including some access key that you are not including in n8n? I tried to downloading the file using the browser but I get

No, I’m sorry that URL provided has the key dummied out. May I DM you a link to try?

For some reason, discourse it’s not letting me open my private messages. I will check it out when I can open thenm again.

1 Like

Ok, it’s an issue on our side. The GET request by default set the content-type to application/json but since you are downloading a file it should be set at all. Sadly there is no way to override the content-type when doing a GET request. Will add a fix and hopefully will be available in the next release.

Sounds good, thanks for working on it.

Got added. We will let you know when it’s released.

Fix got released with [email protected]

1 Like

Looking forward to 0.150.0 releasing on cloud :grinning: