Set AWS S3 bucket permission with mc tool
Use mc tool to set AWS S3 permission.
Install mc
brew install minio/stable/mc
Usage
prepare mc-policy.json
{
"Statement": [
{
"Sid":"PublicRead",
"Effect":"Allow",
"Principal": "*",
"Action":["s3:GetObject","s3:GetObjectVersion"],
"Resource":["arn:aws:s3:::BUCKET1/PREFIX1*","arn:aws:s3:::BUCKET1/PREFIX2*"]
}
],
"Version": "2012-10-17"
}
mc policy set-json mc-policy.json s3/BUCKET1
mc policy get-json s3/BUCKET1/
Reference
https://docs.min.io/docs/minio-client-quickstart-guide.html
Disclaimer
- License under
CC BY-NC 4.0
- Copyright issue feedback
me#imzye.me
, replace # with @ - Not all the commands and scripts are tested in production environment, use at your own risk
- No privacy information is collected here