尝试在我创建的API网关中发布内容:
{
"Message": "User: anonymous is not authorized to perform: execute-api:Invoke on resource: arn:aws:execute-api:us-west-2:***********:jrr7u1ekrr/v0/POST/user"
}
如何更新CloudFormation中的策略以使POST端点公开可用?我正在使用AWS::ApiGateway::RestApi
资源类型声明API。
API策略属性为:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": "*",
"Action": "execute-api:Invoke",
"Resource": "execute-api:/*/POST/user"
}
]
}