Set up S3 as repository

Set up S3 as repository

by Jose Sandoval -
Number of replies: 2

Hello,

I'm trying to setup a S3 bucket to serve as repository.

I've created the S3 bucket and AWS account. Configured properkey and secret key in Moodle. I've tryed several permissions at the bucket but still I got:

"Error while communicating with the repository '...' "

My last test was done with the following permissions:

{

    "Version": "2012-10-17",

    "Statement": [

        {

            "Effect": "Allow",

            "Action": [

                "s3:ListBucket"

            ],

            "Resource": "*"

        },

        {

            "Effect": "Allow",

            "Action": [

                "s3:ListBucket"

            ],

            "Resource": "arn:aws:s3:::<my_actual_bucket>/*"

        },

        {

            "Effect": "Allow",

            "Action": [

                "s3:PutObject",

                "s3:GetObject"

            ],

        "Resource": "arn:aws:s3:::<my_actual_bucket>/*"

        }

    ]

}


I'm using Moodle 3.9

Anyone knows the right permissions needed?, or knows what more has to be done?

Thank you


Average of ratings: -
In reply to Jose Sandoval

Re: Set up S3 as repository

by Boaz Neeman_Golan -

have you found a solution?

I am running the exactly same issue. I can see the S3 bucket, but when I try to enter it, I get "Error while communicating with the repository '...' "

In reply to Jose Sandoval

Re: Set up S3 as repository

by Roy Plomantes -

You may try this permission policy,

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:GetBucketLocation",
                "s3:ListAllMyBuckets"
            ],
            "Resource": "arn:aws:s3:::*"
        },
        {
            "Effect": "Allow",
            "Action": "s3:*",
            "Resource": [
                "arn:aws:s3:::[your bucket name]",
                "arn:aws:s3:::[your bucket name]/*"
            ]
        }
    ]
}