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

相关推荐
2501_9304724412 分钟前
上云迁移验收-CVM健康校验用例与数据库比对报告
数据库·人工智能·阿里云·云计算·腾讯云
AI_Cloud_推荐2 小时前
Android集成百度人脸离线SDK实战:从环境搭建到活体检测(附避坑清单)
android·人工智能·百度·云计算·视觉检测·智能硬件
峰向AI2 小时前
坚持不下去?这个 14K Star 的 App 把你的习惯变成 RPG 游戏
github
Bmob后端云3 小时前
Bmob后端云实战|Python实现SSE流式输出,给备忘录AI加上打字机效果
前端·github
小马同学-3 小时前
01 容器技术概述
运维·docker·云计算
悟乙己4 小时前
逛逛阿里云 官方Skills 门户
阿里云·云计算
2501_930472444 小时前
深度复盘|数据库迁移实战(上):腾讯云助手解析慢查询日志,定位索引缺失与语法不兼容
数据库·阿里云·ffmpeg·云计算·腾讯云·aws
万象新讯4 小时前
申请 AWS Activate 的初创企业要满足什么条件,需准备哪些资料?
大数据·人工智能·aws
商业看点解说5 小时前
AWS Activate除了提供云积分,还能为初创企业提供哪些技术和生态资源?
aws
峰向AI15 小时前
还在手动配 SSL 证书?这个 75K Star 的 Web 服务器让 HTTPS 自动到起飞
github