Nei*_*son 6 amazon-web-services aws-cloudformation
此 CF 模板失败:
MyECSrepo:
Type: "AWS::ECR::Repository"
Properties:
RepositoryName: !Ref RepoName
RepositoryPolicyText:
Version: "2012-10-17"
Statement:
- Sid: AllowAll
Effect: Allow
Principal:
AWS:
- arn:aws:iam::00000000000:group/admin
Action:
- "ecr:*"
Run Code Online (Sandbox Code Playgroud)
堆栈创建产生此错误:
“PolicyText”中的无效参数未能满足约束:“提供的存储库策略无效”
可能是什么问题?
阅读了有关ECR Repository Policy的文档后,发现它仅限于 Principal 列表的用户和 root 帐户。因此,您可能需要换出以列出您想要授予访问权限的所有用户。
亚马逊文档有一些示例,其中有一些示例说明您可以使用它做什么。
为了防止布偶公爵链接中断,这里有一个例子。今天我在使用自动创建的 json 时遇到了麻烦。这似乎解决了它。
{
"Version": "2008-10-17",
"Statement": [
{
"Sid": "AllowPushPull",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::<<id number of root user here>>:user/<<some iam user>>"
},
"Action": [
"ecr:BatchCheckLayerAvailability",
"ecr:BatchGetImage",
"ecr:CompleteLayerUpload",
"ecr:GetDownloadUrlForLayer",
"ecr:InitiateLayerUpload",
"ecr:PutImage",
"ecr:UploadLayerPart"
]
}
]
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
9822 次 |
| 最近记录: |