def METHOD_NAME(
    self,
    resource="arn:aws:s3:::mybucket/*",
    effect="Allow",
    actions=None,
    principal=None,
):
    policy = {
        "Version": "2012-10-17",
        "Statement": [
            {
                "Effect": effect,
                "Principal": principal or "*",
                "Action": actions or ["s3:GetObject"],
                "Resource": resource,
            }
        ],
    }
    self.client.put_bucket_policy(Bucket="mybucket", Policy=json.dumps(policy))