Skip to content

Instantly share code, notes, and snippets.

@jsohndata
Last active March 24, 2023 20:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsohndata/eb3b3d6e5dffbc1274f22965d312d375 to your computer and use it in GitHub Desktop.
Save jsohndata/eb3b3d6e5dffbc1274f22965d312d375 to your computer and use it in GitHub Desktop.
Bucket Rules

Bucekt Rules

GCP

Storage > Rules

rules_version = '2';
service firebase.storage {
  match /b/{bucket}/o {
    match /{allPaths=**} {
      allow read: if true;
      allow write: if false;
    }
  }
}

Amazon S3

S3 > Bucket > YOUR__BUCKET__NAME: Permissions

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "PublicReadGetObject",
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::YOUR__BUCKET__NAME/*"
        }
    ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment