2017-10-24 8 views
0

AWS 콘솔의 가져 오기 버튼에서 API 게이트웨이를 만들려고합니다.API 게이트웨이 가져 오기 시간에 일시적인 오류가 발생했습니다.

우리가 콘솔에서 자신감 파일을 가져올 때
{ 
    "Version": "2012-10-17", 
    "Statement": [ 
     { 
      "Effect": "Allow", 
      "Action": [ 
       "apigateway:GET" 
      ], 
      "Resource": [ 
       "arn:aws:apigateway:*::/*" 
      ] 
     }, 
     { 
      "Effect": "Allow", 
      "Action": [ 
       "apigateway:PUT" 
      ], 
      "Resource": [ 
       "arn:aws:apigateway:*::/restapis/`our-api-id`/*" 
      ] 
     } 
    ] 
} 

, 그것은 무작위로 다음과 같은 오류 메시지를 표시 : 우리는 왜 때때로 모르는

User: arn:aws:iam::`account-id`:user/`user-id` is not authorized to perform: apigateway:PUT on resource: arn:aws:apigateway:eu-west-1::/restapis/`our-api-id` 

다음과 같이

사용자 정책은 같은 행동이 효과가 있고 때로는 그렇지 않습니다.

아이디어가 있으십니까?

답변

1

사용 권한 오류가 간헐적이어서는 안됩니다. 그러나 PUT 작업 (특히 풋 나머지 API 작업)을위한 리소스는

 { 
      "Effect": "Allow", 
      "Action": [ 
       "apigateway:PUT" 
      ], 
      "Resource": [ 
       "arn:aws:apigateway:*::/restapis/`our-api-id`" 
      ] 
     } 
이어야합니다.