0

I have permission set created in AWS, and I am creating an INLINE policy where I want to give access to a specific bucket .

when I am trying below it works fine which is something I don't want, however when add resource to like and resource arn arn:aws:s3:::bucket_name or arn:aws:s3:::*data* it shows me insufficient privilege and I am not able to access.

    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:*"
            ],
            "Resource": [
                "*"
            ]
        }
    ]
}

policy I am using which Is not working

    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "s3:*",
            "Resource": [
                "arn:aws:s3:::data*",
                "arn:aws:s3:::data*/*"
            ]
        }
    ]
}
}
waseem mir
  • 21
  • 5

1 Answers1

0

The policy should be:

    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "s3:*",
            "Resource": [
                "arn:aws:s3:::BUCKET-NAME",
                "arn:aws:s3:::BUCKET-NAME/*"
            ]
        }
    ]
}
}
Marcin
  • 215,873
  • 14
  • 235
  • 294
  • I have tried this too, it is also not working I tried both inline and customer managed policy. I think for SSO inline policy there is something else it require – waseem mir Aug 31 '23 at 07:56
  • Also what is the difference between the policy I am using and you shared as solution, aint both same? – waseem mir Aug 31 '23 at 07:57