我需要使用云形式创建具有S3权限的IAM用户。
我没有找到解决方案
使用AWS :: iam ::用户创建IAM用户。
这是使用托管策略的YAML模板:
DeveloperUser:
Type: 'AWS::IAM::User'
Properties:
UserName: user-developer
ManagedPolicyArns:
- 'arn:aws:iam::aws:policy/AWSServiceCatalogEndUserFullAccess'
- 'arn:aws:iam::aws:policy/ReadOnlyAccess'
- 'arn:aws:iam::aws:policy/CloudWatchFullAccess'
- 'arn:aws:iam::aws:policy/AmazonVPCFullAccess'
- 'arn:aws:iam::aws:policy/AmazonS3FullAccess'
这是具有内联权限的JSON政策:
"User":{
"Type":"AWS::IAM::User",
"Properties":{
"Policies":[
{
"PolicyName":"S3",
"PolicyDocument":{
"Statement":[
{
"Effect":"Allow",
"Action":[
"s3:*",
],
"Resource":[
"arn:aws:s3:::my-bucket",
"arn:aws:s3:::my-bucket/*"
]
}
]
}
}
]
}
}
您可以尝试https:krunal4amity.github.io。它是一个在线AWS云形式模板生成器。它花费了生成模板所需的大量手动工作和时间。