getting message: forbidden reply from AWS API gateway

前端 未结 20 1086
鱼传尺愫
鱼传尺愫 2020-11-30 04:34

I am trying to create a lambda service on AWS and have it accessed from outside via the API gateway with no authentication or restriction required.

To make things ea

20条回答
  •  Happy的楠姐
    2020-11-30 05:07

    I got this error from an nginx fargate service trying to access a private API in API Gateway. I needed to add a policy under resource policies in my api like this

    {
        "Version": "2012-10-17",
        "Statement": [
            {
                "Effect": "Allow",
                "Principal": "*",
                "Action": "execute-api:Invoke",
                "Resource": "arn:aws:execute-api:us-east-1::/*",
                "Condition": {
                    "StringEquals": {
                        "aws:sourceVpce": ""
                    }
                }
            }
        ]
    }
    

提交回复
热议问题