AWS Chalice需要AWS IAM政策

2024-06-02 06:30:01 发布

您现在位置:Python中文网/ 问答频道 /正文

需要什么IAM角色策略AWS Chalice

Github中没有官方文档

运行AWS Chalice需要哪些权限


Tags: 文档githubaws权限角色官方策略iam
1条回答
网友
1楼 · 发布于 2024-06-02 06:30:01

截至2020年9月7日,没有关于Github的正式文档,并且有一个Open issue on documentation regarding IAM

所需的权限为

  1. API网关
  2. 兰姆达

对我有效的政策

{
"Version": "2012-10-17",
"Statement": [
    {
        "Sid": "Stmt1471020565000",
        "Effect": "Allow",
        "Action": [
            "iam:AttachRolePolicy",
            "iam:DeleteRolePolicy",
            "iam:DetachRolePolicy",
            "iam:CreateRole",
            "iam:PutRolePolicy",
            "iam:GetRole",
            "iam:PassRole"
        ],
        "Resource": [
            "*"
        ]
    },
    {
        "Sid": "Stmt1471020565001",
        "Effect": "Allow",
        "Action": [
            "apigateway:GET",
            "apigateway:HEAD",
            "apigateway:POST"
        ],
        "Resource": [
            "arn:aws:apigateway:ap-south-1::/restapis",
            "arn:aws:apigateway:ap-south-1::/restapis/*/resources",
            "arn:aws:apigateway:ap-south-1::/restapis/*/resources/*"
        ]
    },
    {
        "Sid": "Stmt1471020565002",
        "Effect": "Allow",
        "Action": [
            "apigateway:DELETE"
        ],
        "Resource": [
            "arn:aws:apigateway:ap-south-1::/restapis/*/resources/*"
        ]
    },
    {
        "Sid": "Stmt1471020565003",
        "Effect": "Allow",
        "Action": [
            "apigateway:POST"
        ],
        "Resource": [
            "arn:aws:apigateway:ap-south-1::/restapis/*/deployments",
            "arn:aws:apigateway:ap-south-1::/restapis/*/resources/*"
        ]
    },
    {
        "Sid": "Stmt1471020565004",
        "Effect": "Allow",
        "Action": [
            "apigateway:PUT"
        ],
        "Resource": [
            "arn:aws:apigateway:ap-south-1::/restapis/*/methods/GET",
            "arn:aws:apigateway:ap-south-1::/restapis/*/methods/GET/*",
            "arn:aws:apigateway:ap-south-1::/restapis/*/methods/POST",
            "arn:aws:apigateway:ap-south-1::/restapis/*/methods/POST/*",
            "arn:aws:apigateway:ap-south-1::/restapis/*/methods/PUT",
            "arn:aws:apigateway:ap-south-1::/restapis/*/methods/PUT/*"
        ]
    },
    {
        "Sid": "Stmt1471020565005",
        "Effect": "Allow",
        "Action": [
            "apigateway:PATCH"
        ],
        "Resource": [
            "arn:aws:apigateway:ap-south-1::/restapis/*"
        ]
    },
    {
        "Effect": "Allow",
        "Action": "lambda:*",
        "Resource": "*"
    }
]
}

相关问题 更多 >