Skip to content
Daniël Klabbers edited this page Aug 20, 2023 · 3 revisions

Install necessary package

composer require league/flysystem-aws-s3-v3 "1.*"

This will install a required package needed for uploading your files into S3.

Enable public readable buckets

Use the following bucket policy.

{
    "Version": "2008-10-17",
    "Statement": [
        {
            "Sid": "AllowPublicRead",
            "Effect": "Allow",
            "Principal": {
                "AWS": "*"
            },
            "Action": [
                "s3:GetObject"
            ],
            "Resource": [
                "arn:aws:s3:::bucket/*"
            ]
        }
    ]
}

Replace bucket with your bucket name.

Clone this wiki locally