- 최신
- 최다 투표
- 가장 많은 댓글
Hi There,
Can you confirm if you are able to get a response from your lambda when hitting the apigateway directly ?
**Please ensure to add API mappings for the Custom domain names to associate the API , Stage & Path.
You can click on 'Configure API mappings' under the path : 'API Gateway' > ' Custom domain name' > 'API mappings'**
Most probably you are missing this mapping due to which you are getting {"message":"Forbidden"}
Thanks
Resolution for me was that I had forgotten the A record in the hosted zone pointing from the generated "API Gateway domain name" to your domain name.
Ferom the console the generated domain name can be found in API gateway -> Custom domain names -> <YOUR DOMAIN> -> Configurations -> API Gateway domain name
In Python CDK this looked something like:
api_domain_name = <YOUR DOMAIN NAME> api_domain = cdk.aws_apigateway.DomainName( self, "ApiDomainName", domain_name=api_domain_name, certificate=cert, ) cdk.aws_route53.ARecord( self, "ApiGWARecord", zone=hostzone, record_name=api_domain_name, target=cdk.aws_route53.RecordTarget.from_alias( cdk.aws_route53_targets.ApiGatewayDomain( api_domain, ) ), )
관련 콘텐츠
- 질문됨 6달 전
- AWS 공식업데이트됨 일 년 전
Hei, I found the solution later. I did few things. One of them is that I had to remove the "stage" from the link.