带有AWS WAF的AWS API Gateway

问题描述:

我想将AWS Web Application Firewall服务与AWS API Gateway一起使用。 AWS WAF仅适用于AWS CloudFront发行版。

I want to use AWS Web Application Firewall service with AWS API Gateway. AWS WAF works only with AWS CloudFront distributions.

根据此帖子 https://forums.aws.amazon.com/message.jspa?messageID=677382 API网关在后台创建了CloudFront发行版。尽管我在CloudFront控制台和WAF控制台中都看不到此分布。

According to this post https://forums.aws.amazon.com/message.jspa?messageID=677382 API Gateway creates a CloudFront distribution behind the scenes. Although I don't see this distribution neither in the CloudFront console nor in the WAF console.

有没有办法利用由API Gateway为WAF创建的CloudFront发行版?

Is there any way to make use of the CloudFront distribution created by API Gateway for WAF?

不幸的是,API Gateway不提供对支持CloudFront发行版的访问。要使用WAF,您必须创建第二个发行版,该发行版效率低下,但在功能上应该可以使用。

Unfortunately no, API Gateway does not provide access to the backing CloudFront distribution. To use WAF you would have to create a second distribution, which is inefficient but should functionally work.