API Gateway API Mappings deployed through CDK do not work until modified via console

0

We have a CDK v1.152.0 stack that has a RestApi with an api mapping to a custom domain (created using the RestApi and BasePathMapping CDK constructs). The API Gateway fronts a Fargate cluster which is load balanced (created with the ApplicationLoadBalancedFargateService CDK construct). We are seeing unusual behavior related to the api mapping.

When the stack is first deployed via CDK, the API ID based URL (i.e. https://<api-id>.execute-api.<region>.amazonaws.com/<stagename>) works. However, the URL that uses the custom domain and api mapping does not - it returns Forbidden.

At this point, either of the following 2 actions will allow both the API ID based URL as well as the custom domain/api mapping based URL to function properly:

  1. Modify the api mapping path value via the console to an invalid value, then change it back to the valid value
  2. Completely delete the api mapping for this API via the console.

We don't understand why this is necessary (and especially - how the custom domain/api mapping URL can continue to work at all once the API Mapping record is deleted through the console). We've been able to duplicate the behavior described above consistently.

Has anyone experienced similar behavior or know a reason why the api mapping would need to be touched through the console before it works properly?

1개 답변
0

Hello,

Thank you for reaching out to us.

In order to troubleshoot this issue further, could you please provide steps to reproduce this issue. I would also recommend to open a support case with API ID and custom domain to investigate on this issue further.

AWS
지원 엔지니어
답변함 2년 전
  • Thanks. A day after posting this message we opened a support ticket and are pursuing the matter that way.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠