读写授权
1. OOS相关
创建对应{bucket},{object}
- 选择地域
2. RAM相关
创建对应子账户
- 启用编程访问
创建自定义授权
- 命名 CustomOssAuthorization{bucket}{obiect}rw
授权语句
{ "Statement": [ { "Effect": "Allow", "Action": "oss:ListBuckets", "Resource": "acs:oss:*:*:*" }, { "Action": "oss:*", "Effect": "Allow", "Resource": [ "acs:oss:*:*:{bucket}", "acs:oss:*:*:{bucket}/{obiect}/*" // {object如果没有就可以不写} ] } ], "Version": "1" }
{ "Statement": [ { "Effect": "Allow", "Action": "oss:ListBuckets", "Resource": "acs:oss:*:*:*" }, { "Action": "oss:*", "Effect": "Allow", "Action": [ "ListObjects" ] "Resource": [ "acs:oss:*:*:{bucket}", "acs:oss:*:*:{bucket}/{obiect}/*" ] } ], "Version": "1" }
只读访问单台ECS
{ "Version": "1", "Statement": [ { "Action": "ecs:Describe*", "Resource": "*", "Effect": "Allow" }, { "Action": "ecs:List*", "Resource": [ "acs:ecs:cn-shanghai:*:instance/i-uf67snh699skxo202uj4" ], "Effect": "Allow" }, { "Action": [ "vpc:DescribeVpcs", "vpc:DescribeVSwitches" ], "Resource": "*", "Effect": "Allow" } ] }