在 aws 工作区与 ec2 实例上托管 rest-api 服务器?

Hosting rest-api server on aws workspace vs ec2 instance?

我需要在执行下列任务的服务器上使用 rest-api 托管服务:

我知道 ec2 实例将是托管我的服务的更好方法,但考虑到工作区和 ec2 实例之间的价格差异,我正在探索这条路线。 amazon workspace 是否有任何限制可能会阻止我将它们用于我的用例?

我遇到了 ngrok,我相信它可以帮助我通过 Internet 将请求定向到我的工作区本地服务器。

有没有人玩过它并可以提出一些建议?

恐怕 AWS 服务条款不允许您这样做。请参阅有关工作区的第 36 节。

http://aws.amazon.com/service-terms/

36.3. You and End Users may only use the WorkSpaces Services for an End User’s personal or office productivity. WorkSpaces are not meant to accept inbound network connections, be used as server instances, or serve web traffic or your network traffic. You may not reconfigure the inbound network connections of your WorkSpaces. We may shut down WorkSpaces that are used in violation of this Section or other provisions of the Agreement.

我建议您使用成本最低的 32GB RAM 实例类型 r5a.xlarge(它的 AMD 处理器比英特尔的 r5 便宜)。研究如果您的状态持续存在于 S3 而不是本地实例中,那么 Spot 实例是否会工作,否则如果您需要它至少一年,预留实例会比按需定价打折。