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

相关推荐
wanhengidc11 小时前
云手机和网盘之间的关系
网络·游戏·智能手机·架构·云计算
亚林瓜子13 小时前
AWS中国云中的ETL之从aurora搬数据到s3(Glue版)
hadoop·spark·云计算·etl·aws
Lin_Aries_042113 小时前
通过配置 GitLab 自动触发项目自动化构建与部署
运维·docker·容器·自动化·云计算·gitlab
Net_Walke14 小时前
git 的常用命令
git·物联网·github·iot
iconball15 小时前
个人用云计算学习笔记 --15. (Linux 系统启动原理、Linux 防火墙管理))
linux·运维·笔记·学习·云计算
NY615 小时前
腾讯云上TKE集群中通过clb-ingress公网访问到后端服务
云计算·腾讯云
一点一木16 小时前
🚀 2025 年 09 月 GitHub 十大热门项目排行榜 🔥
前端·人工智能·github
XINVRY-FPGA17 小时前
XA7A75T-1FGG484Q 赛灵思 Xilinx AMD Artix-7 XA 系列 FPGA
嵌入式硬件·fpga开发·车载系统·云计算·硬件架构·硬件工程·fpga
逛逛GitHub17 小时前
推荐 7 个本周 yyds 的 GitHub 项目。
github