简体   繁体   English

AWS:如何限制从 Amplify 应用程序访问 API 网关?

[英]AWS: how to restrict access to API gateway from Amplify app?

I have an Amplify app which I'd like to be the only one allowed to call an API gateway.我有一个 Amplify 应用程序,我想成为唯一允许调用 API 网关的应用程序。

What's the best way to achieve that?实现这一目标的最佳方法是什么?

It seems possible to make the gateway private to a single VPC - but it seems like AWS Amplify app can't be placed inside any single VPC .似乎可以使网关私有到单个 VPC - 但似乎AWS Amplify 应用程序不能放置在任何单个 VPC 内

Are there other ways?还有其他方法吗? Can I whitelist based on arn?我可以基于 arn 加入白名单吗? IP?知识产权? Other options?其他选择?

AFAIK, VPC support is currently not available out of the box (may be in the future). AFAIK,VPC 支持目前不可用(可能在未来)。

Some workarounds I've used are:我使用的一些解决方法是:

  • Whitelist the API gateway only to your IP address仅将 API 网关列入您的 IP 地址的白名单
  • Integrate private API gateway + Cloudfront and place WAF in front of it集成私有API网关+Cloudfront,前面放置WAF

REF: https://github.com/aws-amplify/amplify-hosting/issues/12参考: https ://github.com/aws-amplify/amplify-hosting/issues/12

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM