我是AWS新手,现在执行时面临访问被拒绝的问题
aws s3api list-objects --bucket BUCKET_NAME
以下是我的配置:
IAM 角色政策
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:*",
"s3-object-lambda:*"
],
"Resource": "*"
}
]
}
桶政策
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowAllActionsForUsersWhoCanList",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::BUCKET_NAME/*",
"arn:aws:s3:::BUCKET_NAME"
]
}
]
}