Is it more cost effective to host files in s3 for our training platform on azure VM or move the app to an instance in the same region as our s3 bucket?

0

We currently host our video in s3. Our App is currently running on an Azure VM (ubuntu 22.04, Nextjs front end, node express backend). Our app is a company training app, where our storage of training videos can get up to 200 gigs and our employees of 3,000 would be using the platform to view our training videos from the front end.

At the moment, costs have been low with testing and having low users for testing. However, our data transfer usage can become pretty high with as little as 2 gigs of storage (that we have now) and 3,000 users training over a 2 week period.

Is it more cost effective to run the app in an instance in the same region, or is it the same as we would estimate when using the Azure VM (where all of our other apps are)?

1 Answer
1
Accepted Answer

You have to understand the data transfer costs of AWS. Here is blog to give you an overview of common patterns.

https://aws.amazon.com/blogs/architecture/overview-of-data-transfer-costs-for-common-architectures/

In your use case

Scenario 1: App is in Azure VM (Azure cloud) and Videos are in S3 . you have to pay for outbound data transfer between your app hosted on Azure VM and S3 bucket + Azure cloud outbound data transfer charges.

Scenario 2 (recommended approach, most cost effective): App is in AWS EC2 instance with a VPC endpoint to access the S3 bucket for videos. You don't have to pay data transfer charges between the application hosted on EC2 instance, still have to pay for outbound data transfer charges to access the application from the AWS Cloud.

Scenario 3 (not recommended): App is in AWS EC2 instance with a NAT gateway to access the S3 bucket for videos. you have to pay for data processing charges (per GB) for data that passes through the NAT gateway + AWS cloud outbound data transfer charges.

I would recommend moving your application to AWS EC2 instance (automate the EC2 instance provisioning using IaC of your choice) and utilize scenario 2 to serve the video content to your employees.

You can further improve or extend the solution by utilizing AWS CloudFront to serve the videos from the edge(caching content)

https://docs.aws.amazon.com/AmazonS3/latest/userguide/tutorial-s3-cloudfront-route53-video-streaming.html

I hope this bring some clarity.

Thanks, Abhishek

profile picture
answered 8 months ago
profile pictureAWS
EXPERT
reviewed 8 months ago
  • Thank you very much for answering. I do not understand one part though: "still have to pay for outbound data transfer charges to access the application from the Application."

    What do you happen to mean here?

  • hi @johnH, I have corrected my statement , it was a typo "you still have to pay for outbound data transfer charges to access the application from the AWS Cloud". This cost applies in all three scenarios.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions