简体   繁体   English

从公共 su.net 连接到私有 su.net

[英]Connecting from public subnet to private subnet

I just want to ask a scenario.我只想问一个场景。 I am planning to create a simple architecture.我打算创建一个简单的架构。

I will create only one VPC and will create two EC2 that one of them is public su.net and the other one is private su.net.我将只创建一个 VPC,并将创建两个 EC2,其中一个是公共 su.net,另一个是私有 su.net。

I will deploy my vuejs app on public su.net I will deploy my rest APIs and database on private su.net我将在公共 su.net 上部署我的 vuejs 应用程序 我将在私有 su.net 上部署我的 rest API 和数据库

As i said, they will be in the same VPC.正如我所说,它们将在同一个 VPC 中。

In this scenario, will i need a NAT gateway?在这种情况下,我需要 NAT 网关吗? or no need for NAT gateway between private and public su.nets within only one VPC?或者仅在一个 VPC 内的私有和公共 su.net 之间不需要 NAT 网关? Because on the AWS pricing, it is written that no pay for VPC but pay for NAT gateway.因为AWS pricing上面写着VPC不pay,NAT gateway付费。

Best最好

Inside the VPC, as soon as the SecurityGroups allow it, you can communicate between the different private and public su.nets.在 VPC 内部,只要 SecurityGroups 允许,您就可以在不同的私有和公共 su.net 之间进行通信。

But here I have a concern.但在这里我有一个担忧。 If the VueJS app runs on the users browser, then it will contact the API on the inte.net and then the API needs to be publicly accessible.如果 VueJS 应用程序在用户浏览器上运行,那么它将联系 inte.net 上的 API,然后 API 需要可公开访问。 So « in the public su.net » (or behind an ALB that is public).所以“在公共 su.net 中”(或在公共 ALB 后面)。

One usual way to achieve this the most natively possible is by putting the VueJS app within an S3 bucket (almost no costs), with a cloudfront distribution, and having API Gateway or AppSync serving your API. Only your database if this is RDS would use the VPC.以最原生的方式实现这一点的一种常用方法是将 VueJS 应用程序放在 S3 存储桶中(几乎没有成本),使用云前端分发,并使用 API 网关或 AppSync 为您的 API 提供服务。只有您的数据库(如果这是 RDS)才会使用专有网络。

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

相关问题 AWS - vpc:从公有子网访问私有子网 - AWS - vpc: private subnet access from public subnet 将 RDS Aurora 实例从私有迁移到公共 su.net - Move RDS Aurora Instance from private to public subnet 我们可以将私有 su.net lambda 连接到公共 su.net 中的资源吗? - Can we connect private subnet lambda to resources in public subnet? ETL 实例应该在私有的还是公共的 su.net 中? - Is an ETL instance supposed to be in private or public subnet? AWS VPC 识别私有和公共 su.net - AWS VPC identify private and public subnet AWS:SSH 通过 NAT 网关从公共 su.net EC2 实例到私有 su.net EC2 实例没有发生 - AWS : SSH to private subnet EC2 instance from public subnet EC2 instance via NAT GATEWAY is not happening 为什么我的安全组规则在从私有 su.net 调用公共 su.net 时不起作用? - Why does my security group rule not work when calling from the private to public subnet? 从 AWS 提供的这个图表示例中给出的私有 su.net 中的公共访问路径是什么 - What is the route for public access from within a private subnet given in this diagram-example provided by AWS 从 elb 在私人 su.net 中访问 ASG 的问题 - Problem with accessing ASG in private subnet from elb AWS Fargate 私有 su.net,从 ECR 中提取 - AWS Fargate private subnet, pulling from ECR
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM