Closed ajmichels closed 2 years ago
1) Works for me under the same conditions (PHP 7.4, MediaWiki 1.35, Extension:AWS 0.11.1) after updating composer dependencies: the file was uploaded correctly. So we can rule the possibility that some breaking changes (e.g. in aws/aws-sdk-php) could have happened in upstream libraries when updating Composer dependencies.
2) Please double-check everything from https://aws.amazon.com/premiumsupport/knowledge-center/s3-403-forbidden-error/
You mentioned that you were able to upload via AWS CLI, so a big suspect there is "Block Public Access" part (you might have been uploading S3 object as "private", but extension is using "public-read", as the wiki is public, and this behavior hasn't been overridden with $wgFileBackends['s3']['privateWiki'] = true;
).
Yes, this was the issue. I actually found this right before seeing your response. Specifically this setting:
Our Wiki is private. I am confused how this was once working before and I didn't previous have this privateWiki
setting set. Is this something that changed recently... am very confused by how this issue just started happening without me making any configuration change... Strange.
Everything is working now even with all public access blocked on the bucket.
Thank you for your help.
I recently started getting these errors and I am struggling to figure out why.
I am on PHP 7.4, MediaWiki 1.35, Extension:AWS 0.11.1.
I did recently update my composer dependencies. Per the MediaWiki documentation I removed my
composer.lock
file and rancomposer install
Files are still being ''read'' from the bucket correctly via the CloudFront distribution that I created.
I verified that the AWS credentials I am using are still working correctly. I used the AWS CLI with those same credentials to interact with the S3 bucket on the EC2 instance that the wiki is running on.
I also tried using the latest code from the extension's repo (a08f5d) and then doing the composer update again.
To be clear, this was working just fine a up until mid Dec 2021 (the last time a file was uploaded). The only thing that has changed since then was that I updated the composer dependencies and I enabled the VisualEditor functionality.
Any help would be appreciated.
Here are the versions Composer is using for this extension's dependencies:
And here is the error I am seeing in the debug logs (some information obfuscated):