single page website

0

Though have an EC2 is use to run a small docker instance to host a single page python app which ends up costing $30/month, wondering if there's a less dear option?

質問済み 2年前311ビュー
3回答
2

A possibly cheaper option might be to create an Amazon Lightsail container service starting at $7/month. It is also easier to manage and has predictable pricing.

You can find more information on pricing for different container sizes at the Lightsail pricing page and this blog post has step-by-step instructions on how to run containers using Amazon Lightsail.

AWS
回答済み 2年前
1

Choosing the appropriate compute is challenging when you have many options from AWS to choose from. Personally I only want to pay for the milliseconds of usage rather than paying for compute that is sitting idle. Have you profiled your workload to see how idle the EC2 option really is? Is the EC2 appropriately rightsized? Have you considered AWS Compute Optimizer which recommends optimal AWS resources for your workloads to reduce costs and improve performance?

Looking at other technologies then Lightsail, Serverless or Fargate may be an option. When constraints are smaller than the smallest EC2 instance, Fargate’s flexibility of rightsizing provides better cost. Lightsail out of the box maybe cheaper but depending on the frequency of your single page executions Lambda starts saving money over EC2 once it runs half or less of the time. Lambda saves money over Fargate once it runs a quarter or less of the time.

References:

RoB
回答済み 2年前
1

There are a few options for you.

If you have a static website, you can host that in S3: https://docs.aws.amazon.com/AmazonS3/latest/userguide/WebsiteHosting.html.

There are more "complete" solutions for static hosting such as AWS Amplify that combines S3 and CloudFront to manage this for you, and the cost would depend on your usage/content: https://aws.amazon.com/amplify/pricing/?nc=sn&loc=4.

As for dynamic websites (and static as well) - you can look at other container services:

  • Lightsail (as others have mentioned)
  • EC2 (Which you are using). You could try using spot instances to reduce the overall cost of running containers if you want to manage EC2 on your own.
  • Fargate, works with ECS and Kubernetes (https://aws.amazon.com/fargate/)

For more information on containers and different services/options: https://aws.amazon.com/containers/

There are different reasons and preferences for the above - such as do you want/need to manage the EC2 instances on your own or do you want AWS to handle more of the work.

jsonc
回答済み 2年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ