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

相关推荐
Crystal3282 小时前
Git 基础:生成版本、撤消操作、版本重置、忽略文件
前端·git·github
AI_56782 小时前
Finereport如何重塑数据驱动管理
信息可视化·数据分析·云计算
可爱又迷人的反派角色“yang”4 小时前
Mysql数据库(二)
运维·服务器·前端·数据库·mysql·nginx·云计算
Elastic 中国社区官方博客4 小时前
用 Elasticsearch 构建一个 ChatGPT connector 来查询 GitHub issues
大数据·人工智能·elasticsearch·搜索引擎·chatgpt·github·全文检索
用户345848285055 小时前
除了使用dict.fromkeys()和OrderedDict.fromkeys(),还有哪些方法可以实现列表去重?
github
摇滚侠5 小时前
零基础小白自学 Git_Github 教程,git 命令行操作1,笔记18
笔记·git·github
无限进步_5 小时前
C++从入门到类和对象完全指南
开发语言·c++·windows·git·后端·github·visual studio
AWS官方合作商6 小时前
AWS EC2配额限制提升指南:如何申请调整按需实例上限
云计算·aws
itwangyang5206 小时前
在 GitHub 上生成和配置个人访问令牌(PAT),并将其用于 R 环境中的凭证管理和包安装。
开发语言·r语言·github