Amazon S3 Repository rule error - Could not connect to repository
I've been trying to setup an Amazon S3 repository and keep getting an error.
The S3 bucket policy is set to public, to allow all operations for testing. (s3_bucket_policy.txt)
The S3 bucket can be accessed just fine with other tools, such as Postman, using the same Access key ID.
When I try to create a Repository rule in Pega, I get a "Could not connect to repository" error on the rule form and it does not get saved. (repository_rule.jpg)
When I trace the save operation, I can see that Data-Repository.Validate fails. (tracer.jpg, tracer_error.jpg)
I've set all relevant loggers to ALL, and all I can see in logs (pega_log.txt), the most specific error message is:
com.amazonaws.services.s3.model.AmazonS3Exception: Forbidden (Service: Amazon S3; Status Code: 403; Error Code: 403 Forbidden; Request ID: BC558F5C236907DB)
I have tried it on 8.2.1 version, and also on a Pega Clould instance, and I get the same error.
(See the attached files for more details.)
Does anybody have an idea what could be wrong with my configuration?
Thanks in advance,