列出关键点
创建s3
设置s3策略,所有人访问
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Principal": "*",
"Action": [
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::xxx存储名",
"arn:aws:s3:::xxx存储名/*"
]
}
]
}
[
{
"AllowedHeaders": [
"*"
],
"AllowedMethods": [
"GET",
"PUT",
"POST",
"HEAD",
"DELETE"
],
"AllowedOrigins": [
"*"
],
"ExposeHeaders": [
"ETag"
]
}
]
那些用户拥有上传等权限
1.iam左侧栏,点击策略,右上角创建策略点,然后绑上用户名,下面的是策略代码
2.iam直接创建用户名,选择直接绑定策略点,选择刚创建的策略名
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:ListBucket",
"s3:PutObject",
"s3:DeleteObject",
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::存储桶名",
"arn:aws:s3:::存储桶名/*"
]
}
]
}