-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:
-
Environment:mac os sierra
*Location*: https://docs.mongodb.com/stitch/examples/s3-javascript/
*User-Agent*: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36
*Referrer*: https://docs.mongodb.com/stitch/tutorials/?_ga=2.245314950.2092111117.1500220630-1644021956.1492714341
*Screen Resolution*: 1024 x 768
mac os sierra *Location*: https://docs.mongodb.com/stitch/examples/s3-javascript/ *User-Agent*: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36 *Referrer*: https://docs.mongodb.com/stitch/tutorials/?_ga=2.245314950.2092111117.1500220630-1644021956.1492714341 *Screen Resolution*: 1024 x 768
I got stuck in 2 places,
const promise = stitchClient.authManager.anonymousAuth(true);
did not work, it had to be
const promise = stitchClient.login();
and
An Amazon AWS user with PutObject permission on that bucket was not enough for me, i still got an access denied error, i had to add the PutObjectAcl action
"Action": ["s3:PutObject","s3:PutObjectAcl"]
to my bucket policy to be able to put the object in it.
learned a lot, thank you