@rohit1018
Thanks for opening this issue.
Can you give us an example of the code you are using to get this error?
@srchase
let params = {
Bucket: s3environment.Bucket,
Prefix: 'folderName/'+ siteList.name
};
s3.listObjects(params).promise();
Same issue ! i can confirm that downgrading to "aws-sdk": "2.351.0", make it works fine.
I am able to successfully use listObjects with versions 2.352.0 and 2.353.0 with Node and the browser.
const aws = require('aws-sdk');
const s3 = new aws.S3();
const params = {
Bucket: 'myBucket',
Prefix: 'myPrefix'
}
myPromise = s3.listObjects(params).promise()
myPromise.then(function(data) {
console.log(data)
}).catch(function(err) {
console.log(err)
})
Are there any other parts of your code that could be causing issues?
Which browser and version are you using?
No,
google chrome 70.0.3538.77
I am able to successfully use listObjects with version 2.349.0 with Node and the browser.
Angular v7.0.3 and typescrpit 3.1.6
Which version of Angular are you using?
Angular v7.0.3 and typescrpit 3.1.6. listobject not working when aws-sdk versions are v2.352.0 and 2.353.0, working with v2.351.0. i think that the issue is not related to the S3 fonctions but more with aws sdk, i see the same issue with dynamodb on stackoverflow
v2.352.0 !! added new feature !! this is breaking s3 listObject function and or more
"feature: Endpoint Discovery: Some services provide endpoint discovery operations (e.g. 'DescribeEndpoints()'). This SDK feature, if turned on, will automatically request endpoints from services if needed and cache the endpoints returned."
https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md
Thank you @rohit1018 @Temkit . This is possibly related to the endpoint discovery feature. We are investigating this.
Hey,
This issue is raised from isEndpointDiscoveryApplicable() where the environmental variable AWS_ENABLE_ENDPOINT_DISCOVERY is inspected. Actually we shouldn't pull in env in browser platform. I have a PR #2348 out for review. Would you have a look at it? @rohit1018 @Temkit ?
@rohit1018 and @Temkit
@AllanFly120's change to fix this issue has been merged in. This will get fixed with the next release. Thanks for bringing this to our attention.
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.
Most helpful comment
Thank you @rohit1018 @Temkit . This is possibly related to the endpoint discovery feature. We are investigating this.