Private Api Gateway architecture

0

Hi I am trying to follow the best practices, for Public API gateways ("aws_api_gateway_rest_api") I associate a AWS WAF, should I do the same for private API gateways?

Thanks Laeli

1개 답변
0

Hello Laeli,

AWS WAF is a web application firewall that helps protect web applications and APIs from attacks such as SQL injection and cross-site scripting (XSS) attacks. These could affect API availability and performance, compromise security, or consume excessive resources [1].

It is best practice to add additional security layer in front of your API Gateway when API is exposed to public network and source of the requests in unknown. However, in case of private API by design, Private APIs can only be accessed from your virtual private cloud in Amazon VPC by using an interface VPC endpoint [2]. Thus, it is not mandatory to use WAF with your Private API.

Having said that, In case you are exposing your private API to partner account [ cross account scenario ] [3] and/or have a requirement of custom security check based on rules that match a specified string or a regular expression pattern in HTTP headers, method, query string, URI, and the request body or block specific user agents. Then, creating custom WEB ALC and integrating WAF with private API would be beneficial.

Should you still have additional queries or concern, please feel free to reach out to AWS Premium Support with support case and share more details on specific use case for better assistance.

Reference : [1] Using AWS WAF to protect your APIs - https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-control-access-aws-waf.html

[2] Creating a private API in Amazon API Gateway - https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-private-apis.html

[3] https://repost.aws/knowledge-center/api-gateway-private-cross-account-vpce

AWS
지원 엔지니어
답변함 6달 전

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

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

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