aws codecommit 分支访问

Aws codecommit branch access

下午好,

我搜索了几个小时但没有找到任何东西,是否可以禁止某些用户在 AWS Codecommit 中推送 master?

此致, 费利佩·M.

目前分支级权限在 AWS CodeCommit 中不可用。
谢谢,
阿什温

2018 年 5 月 16 日,AWS 宣布 "CodeCommit now enables you to restrict who can commit changes to the master branch or any branch of your choosing"

您需要创建 IAM 策略并将其附加到受限组或用户。下面是示例 IAM 策略。使用所需的 arn 或 *

更新 "Resource"
{
"Version": "2012-10-17",
"Statement": [
    {
        "Effect": "Deny",
        "Action": [
            "codecommit:GitPush",
            "codecommit:DeleteBranch",
            "codecommit:PutFile",
            "codecommit:MergePullRequestByFastForward"
        ],
        "Resource": "arn:aws:codecommit:us-east-2:80398EXAMPLE:MyDemoRepo",
        "Condition": {
            "StringEqualsIfExists": {
                "codecommit:References": [
                    "refs/heads/master"   
                ]
            },
            "Null": {
                "codecommit:References": false
            }
        }
    }
]

}

下面是link转原博客posthttps://aws.amazon.com/blogs/devops/refining-access-to-branches-in-aws-codecommit/