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

相关推荐
Github项目推荐1 分钟前
Rust生态系统在Web开发中的优势(9754)
面试·github
可观测性用观测云1 小时前
AWS VPC NAT 网关可观测最佳实践
aws
一念&1 小时前
Git 与 GitHub 的对比与使用指南
git·github
观测云2 小时前
AWS MemoryDB 可观测最佳实践
云计算·aws
OpenTiny社区3 小时前
面试官:讲讲 Vue Vapor 事件机制?我甩出了这份实测报告!
前端·vue.js·github
mortimer5 小时前
PyInstaller打包踩坑记:从静默崩溃到柳暗花明
人工智能·python·github
天天码行空7 小时前
Radash: 新一代前端工具库平替Lodash库
前端·javascript·github
GoGeekBaird7 小时前
大模型应用的五大拦路虎:一位从业者的深度反思与破局指南
后端·github
MarkGosling8 小时前
【开源项目】轻量加速利器 HubProxy自建 Docker、GitHub 下载加速服务
docker·容器·github
baozj8 小时前
🚀我靠!AI 帮我“摸鱼”摸成了腾讯开源组件库 TDesign 的贡献者!
前端·开源·github