AWS创建github相关的角色

创建github-actions角色

json 复制代码
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": {
                "Federated": "arn:aws:iam::11111111:oidc-provider/token.actions.githubusercontent.com"
            },
            "Action": "sts:AssumeRoleWithWebIdentity",
            "Condition": {
                "StringEquals": {
                    "token.actions.githubusercontent.com:aud": "sts.amazonaws.com"
                },
                "StringLike": {
                    "token.actions.githubusercontent.com:sub": [
                        "repo:project-ventures/test-crawler:*",
                        "repo:project-ventures/test-dash:*",
                        "repo:project-ventures/test-fspa:*",
                        "repo:project-ventures/test-gep:*",
                        "repo:project-network/repl-monitor:*",
                        "repo:project-network/*",
                        "repo:projectdevops/github-actions-demo:*"
                    ]
                }
            }
        },
        {
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:iam::11111111:root"
            },
            "Action": "sts:AssumeRole"
        },
        {
            "Effect": "Allow",
            "Principal": {
                "Service": "ec2.amazonaws.com"
            },
            "Action": "sts:AssumeRole"
        }
    ]
}

在创建一个github-actions用户,将github-actions角色添加到github-actions用户

创建github-cicd角色
json 复制代码
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": {
                "Federated": "arn:aws:iam::1111111:oidc-provider/token.actions.githubusercontent.com"
            },
            "Action": "sts:AssumeRoleWithWebIdentity",
            "Condition": {
                "StringEquals": {
                    "token.actions.githubusercontent.com:aud": "sts.amazonaws.com"
                },
                "StringLike": {
                    "token.actions.githubusercontent.com:sub": "repo:project-network/*"
                }
            }
        }
    ]
}

AmazonS3FullAccess策略完全添加上到github-cicd

相关推荐
wanhengidc8 小时前
云手机的适配性怎么样?
运维·服务器·安全·智能手机·云计算
ssshooter10 小时前
彻底搞懂 SSH 与 Git 的“幕后交易”
git·github·全栈
irisMoon0610 小时前
GitHub Copilot
github·copilot
NineData13 小时前
NineData第三届数据库编程大赛:用一条SQL解数独问题
数据库·云计算·ai编程
消防大队VUE支队16 小时前
家里到底连了多少设备?这款开源神器让你一目了然
github
阿恩.77016 小时前
前沿科技计算机国际期刊征稿:电子、AI与网络计算
人工智能·经验分享·笔记·计算机网络·考研·云计算
逛逛GitHub16 小时前
9 个 超绝的 AI 控制电脑 GitHub 开源项目。
github
云山工作室17 小时前
基于zigbee智能家居的燃气检测系统(论文+源码)
云计算·毕业设计·智能家居
咕噜企业分发小米18 小时前
阿里云与华为云基因测序数据分析性能对比?
阿里云·华为云·云计算
峰顶听歌的鲸鱼19 小时前
15.docker:网络
运维·网络·docker·容器·云计算·php·学习方法