Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Panel
titleExample 5

Revoking read and write access works in the same way as the previous examples for readonly access.

Code Block
policy p0002-sfx -w sean
Setting bucket=p0002-sfx, perm=-w, for user(s)='sean'

Alternatively:

Code Block
pawsey0002:/>policy p0002-sfx -
Deleting all policies on bucket=p0002-sfx



Here we show how to make the objects in a bucket publicly accessible.

Panel
titleExample 6
Code Block
policy p0002-sfx +r *
Expand
titleShow the S3 policy...

pawsey0002:/>info p0002-sfx/

              bucket : p0002-sfx

               owner : pawsey0002

             objects : 3

                size :     13 KB

 === Policy === 

{

    "Id": "pshell-2024-09-19",

    "Statement": [

        {

            "Sid": "2024-09-19-111715",

            "Effect": "Allow",

            "Action": [

                "s3:ListBucket",

                "s3:GetObject"

            ],

            "Resource": [

                "arn:aws:s3:::p0002-sfx",

                "arn:aws:s3:::p0002-sfx/*"

            ],

            "Principal": "*"

        }

    ]

}

Panel
titleExample 6

This will make the objects in p0002-sfx readonly and publicly accessible.

Code Block
pawsey0002:/>policy p0002-sfx +r *
Setting bucket=p0002-sfx, perm=+rwr, for user(s)=None


Expand
titleShow the S3 policy...


Code Block
pawsey0002:/>info p0002-sfx
              bucket : p0002-sfx
               owner : pawsey0002
             objects : 6
                size : 174.03 GB
 === Policy === 
{
    "Id": "generated-policy",
    "Statement": [
        {
            "Sid": "2022Sep08_11:12:28",
            "Effect": "Allow",
            "Action": [
                "s3:ListBucket",
                "s3:GetObject",
                "s3:PutObject",
                "s3:DeleteObject"
            ],
            "Resource": [
                "arn:aws:s3:::p0002-sfx",
                "arn:aws:s3:::p0002-sfx/*"
            ],
            "Principal": "*"
        }
    ]
}



...