Issue in s3 and aws s3

{n8n cloud - Version 1.31.2}
I was trying to list bucket’s objects by using AWS S3 node and got that error when i was testing the connection
{ERROR: Forbidden - perhaps check your credentials?
403 }
and i am totally sure that the tested credentials are working perfectly because i have tried them several times in other frameworks,

later i found another s3 node , so i tried it , it worked fine in only two operations , in listing all buckets and bucket creation , but when i try to use it in any other operation like bucket’s objects retrieval i got that error {Cannot read properties of undefined (reading ‘_’)}

also i thought about using http request in hitting s3 , so i used in http node predefined credential with type AWS to achieve that , but also it didn’t work and i got that error
ERROR: Bad request - please check your parameters

400 - “InvalidArgumentHttp Request has no x-amz-content-sha256 header or it has a blank
amz-content-sha256” - InvalidArgument Http Request has no x-amz-content-sha256 header or it has a blank

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

n8n version: 1.31.2
Running n8n via: n8n cloud

hello @amrmostafa

usually 403 error occurs if the credentials are not for the region of the bucket (it should be the same)

Thanks for your response

it’s the same region , as I mentioned I had tried these credentials with s3 node and just was able to retrieve all buckets and to create bucket

and that’s not useful at all…

but with AWS S3 nothing happened except errors in testing connection and in all operations

well… mine is working fine, so perhaps something is wrong with the settings.
Have you tried to use a custom s3 endpoint?

I am already using a custom s3 endpoint

:thinking: :thinking: :thinking: :thinking: :thinking: :thinking:

You have an issue with permissions. Your credentials should work, and the test connection should be successful.

Perhaps your IAM user/role does not have all the required permissions to access the s3 bucket.

The bare minimum are:

  • s3:GetObject
  • s3:ListBucket
  • s3:GetBucketLocation

Thanks for your response @barn4k

I had tried these credentials on another low code no code tool and s3 worked as expected in all operations. how come it works there and not here ?

:thinking: :thinking: :thinking: :thinking: :thinking: :thinking: :thinking: :thinking:

I solved it by modifying aws.credentials.ts code, you need to modify it to fit all endpoints…

  • n8n team should work on this point. *
1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.