允许从ECR ECR.DKR VPC端点拉出,但不推动?

发布于 2025-02-13 17:58:18 字数 136 浏览 1 评论 0原文

在其附件策略中,可以允许从但不推入Docker API VPC端点(com.amazonaws。

“*”之外,我找不到任何支持操作的参考,是否有一种方法可以指定拉力?还是通过条件的东西?

It is possible to allow pulling from but not pushing to the Docker API VPC Endpoint (com.amazonaws.<region>.ecr.dkr) in its attached policy?

I can't find a reference for any supported actions other than "*", is there a way to specify pull only? Or something via a condition?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

不即不离 2025-02-20 17:58:18

是的,您可以通过VPC端点策略实现这一目标。

这是文档)的示例。该政策使特定的IAM角色可以从Amazon ECR中汲取图像:

{
    "Statement": [{
        "Sid": "AllowPull",
        "Principal": {
            "AWS": "arn:aws:iam::1234567890:role/role_name"
        },
        "Action": [
            "ecr:BatchGetImage",
            "ecr:GetDownloadUrlForLayer",
            "ecr:GetAuthorizationToken"
        ],
        "Effect": "Allow",
        "Resource": "*"
    }]
}

Yes, you can achieve this with a VPC endpoint policy.

Here's an example from the documentation. This policy enables a specific IAM role to pull images from Amazon ECR:

{
    "Statement": [{
        "Sid": "AllowPull",
        "Principal": {
            "AWS": "arn:aws:iam::1234567890:role/role_name"
        },
        "Action": [
            "ecr:BatchGetImage",
            "ecr:GetDownloadUrlForLayer",
            "ecr:GetAuthorizationToken"
        ],
        "Effect": "Allow",
        "Resource": "*"
    }]
}
清秋悲枫 2025-02-20 17:58:18

在AWS控制台中,将您的实例(也许所有可能的安全组)使用的安全组添加到VPC端点。

In AWS Console, add security groups that your instances (maybe all possible security groups) are using to the VPC endpoints.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文