Amazon web services AWSAPI网关。从github更新现有API。添加新路线

Amazon web services AWSAPI网关。从github更新现有API。添加新路线,amazon-web-services,aws-api-gateway,aws-code-deploy,aws-codepipeline,aws-codebuild,Amazon Web Services,Aws Api Gateway,Aws Code Deploy,Aws Codepipeline,Aws Codebuild,我将通过aws CodePipeline中的aws cli命令更新现有的Api网关,并解决CodeBuild存在的问题 An error occurred (AccessDeniedException) when calling the GetRestApis operation: User: arn:aws:sts:<skipped_text> is not authorized to perform: apigateway:GET on resource: arn:aws:api

我将通过aws CodePipeline中的aws cli命令更新现有的Api网关,并解决CodeBuild存在的问题

An error occurred (AccessDeniedException) when calling the GetRestApis operation: User: arn:aws:sts:<skipped_text> is not authorized to perform: apigateway:GET on resource: arn:aws:apigateway:us-west-2::/restapis
是否可以使用CodePipeline和aws cli通过代码更新Api网关?
或者,您使用什么作为更新apigateway的工具

1请检查您的凭据是否正常工作,AWS SDK中使用的凭据似乎对API网关API没有有效权限

您需要为用户/角色定义一个策略,如下所示

2当将CloudFormation与CodePipeline一起使用时,需要创建一个可以由CloudFormation承担的角色,CodePipeline使用您为管道指定的角色通过管道移动发布。CloudFormation需要权限来承担您为CloudFormation操作创建的单独角色—仅创建具有访问其他资源权限的角色是不够的

参考资料

aws论坛


确保将以下策略添加到,以便允许管理员访问API网关的创建、读取、更新和删除

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "apigateway:*"
            ],
            "Resource": "arn:aws:apigateway:*::/*"
        }
    ]
}
也存在于amazon管理的策略下,AmazonAPIGatewayAdministrator


解决了的。问题在于我需要的行动的角色策略