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

相关推荐
阿古达木35 分钟前
沉浸式改 bug,步步深入
前端·javascript·github
小艺E2 小时前
裸金属服务器深度评测:云计算时代的性能与安全担当
服务器·安全·云计算
And_Ii2 小时前
云计算-Raft算法报告-raft与paxos对比
云计算
掘金安东尼3 小时前
,别重复造轮子!新宣【宝藏工具】帮你提效
前端·面试·github
人帅是非多3 小时前
Spanny-使用DSL优雅构建Android富文本库
android·github
我不是迈巴赫5 小时前
开源分享:实习中开发的单点登录Cookie管理神器 | 从痛点到产品的完整实践
前端·面试·github
AKAMAI5 小时前
对象存储应用场景聚焦:全新端点实现更高容量与速度
后端·云原生·云计算
腾讯云大数据6 小时前
平均性能提升70%,盖雅工场基于腾讯云数据仓库TCHouse-D构建实时报表平台
大数据·数据仓库·云计算·腾讯云