Closed ennioVisco closed 3 months ago
It turns out the issue was caused by an env variable: AWS_NODEJS_CONNECTION_REUSE_ENABLED: '1'
that resulted in wrong re-use of the TLS connection.
We adopted that env variable a long time ago, probably by reading this: https://cloudash.dev/blog/http-keep-alive-lambda
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.
Checkboxes for prior research
Note: a fascinating related issue is this one: https://github.com/aws/aws-sdk-js/issues/3591, although in our case the same error is gained both when the code is run locally and via a lambda.
Describe the bug
Hello,
It's been now a couple of weeks of debugging trying to address this issue, and we don't seem to be able to find a way around it.
We have a public s3 bucket, that we fail to access, getting the the title error, but this is a recent behaviour, it used to work perfectly, and in fact we have an old lambda executing a similar code that still works.
What could possibly be the problem?
SDK version number
@aws-sdk/client-s3: 3.550.0
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
v20.9.0
Reproduction Steps
We want to simply access an object from it via the JS api, the code is more or less the following:
SInce the bucket is public, I believe this should be reproducible by anyone.
Of course if you try to access it directly via browser it works ~LINK REMOVED~.
Observed Behavior
Running the previous code, returns the following error (with extra logging enabled)
Expected Behavior
Retrieving the object.
It used to work some time ago, I have a clone of the same lambda of a few months back and it works.
Possible Solution
No response
Additional Information/Context
This is the current bucket policy: