inflated pricing using ec2 on aws. data transfer - amazon-web-services

I have an EC2 service in AWS, in which the only thing I do is upload a .txt file 4 times a day, which all my clients, when using my software, use the last txt I uploaded, it can be updated by all as many times as they want in the day.
Lately with the EC2 service I am being surprised by the cost of ec2 $0.090 per GB - first 10 TB / month data transfer.....
I wanted to know if there is another option to continue using an AWS service where I can host these txt, my clients can consume it and not pay as much as I am doing (more than 200 dollars per month)
DISCLAIMER I AM FROM ARGENTINA

ok the first thing that you have to know is that all the data uploaded is free, BUT if you expose your instance through AWS Load Balancer you will be charged for connections and data processing, the data transfer fees in AWS is basically a head ache IMO.
My suggestion -> AWS S3
If your txt files can be publicly accessible or you can modify your app to create S3 pre-signed URLs to make the files privates but accessible from your customer side, put those files in AWS S3, basically you will pay exactly the same data transfer fee but you will save on Ec2 instance capacity and EBS is a little bit more expensive than S3, additionally you don't need to care about HA or backups.
I think you don't need Cloudfront at the very beginning

Related

I am using digital ocean cloud storage, and I want to migrate to AWS S3

I am using digital ocean spaces as a cloud storage to store users data, and its costing me for both hosting the data and for datatransfer. So, I wanna migrate to Amazon Simple storage s3 (frequent access). I just went through the official docs of AWS S3 and found that, it will cost only for the data hosted in their storage, regardless of the retrieval numbers, I am new to AWS ecosystem and I am not sure about the pricing concept of AWS. Please let me know the pricing estimate for the following scenario:
=> any user can upload a data in my mobile applications
=> if i store around 100 gb of data with AWS s3,
=> if i retrieve that 100 gb around 50 to 100 times a day in my mobile app.
=> how much I need to pay per month,
=> current pricing to store 1 gb is around $0.02.($0.02/1gb)
Not sure what documentation you were reading, but the official S3 pricing page is pretty clear that you are charged for:
Data storage, which depends on region but is somewhere between 2 and 5 US cents per gigabyte, per month.
Number of requests, which again depends on region, but is on the order of a few US cents per 1,000 requests (retrieving a file is a GET request; uploading a file is a PUT request).
Data transfer, which again depends on region, but ranges from a low of $0.09/GB in the US regions, to a high (I think) of $0.154 in the Capetown region.
So, if you're retrieving 100 GB of data 100 times a day, you will be paying data transfer costs of anywhere from $900 to $1540 per day.
In my experience, Digital Ocean tends to be cheaper than AWS for most things (but you get fewer features). However, if you're really transferring 10 TB of data per day (I think that's unlikely, but it's what you asked), you should look for some hosting service that offers unlimited bandwidth.

Reducing AWS Data Transfer Cost for AWS S3 files

AWS S3 has a standard public bucket and folder (Asia Pacific region) which hosts ~30 GB of images/media. On another hand, the website and app access these images by using a direct S3 object URL. Unknowingly we run into high data transfer cost and its significantly unproportionate:
Amazon Simple Storage Service: USD 30
AWS Data Transfer: USD 110
I have also read that if EC2 and S3 is in the same region cost will be significantly lower, but problem is S3 objects are accessible from anywhere in the world from client machine directly and no EC2 is involved in between.
Can someone please suggest how can data transfer costs be reduced?
The Data Transfer charge is directly related to the amount of information that goes from AWS to the Internet. Depending on your region, it is typically charged at 9c/GB.
If you are concerned about the Data Transfer charge, there are a few things you could do:
Activate Amazon S3 Server Access Logging, which will create a log file for each web request. You can then see how many requests are coming and possibly detect strange access behaviour (eg bots, search engines, abuse).
You could try reducing the size of files that are typically accessed, such as making images smaller. Take a look at the Access Logs and determine which objects are being accessed the most, and are therefore causing the most costs.
Use less large files on your website (eg videos). Again, look at the Access Logs to determine where the data is being used.
A cost of $110 suggests about 1.2TB of data being transferred.

How Data Transfer is calculatedin AWS S3?

I was going through the AWS s3 calculator for Standard Storage. I didnt understood the meaning of Data Transfer calculation. How it is calculated?
Data Transfer:
Inter-Region Data Transfer Out: 10GB/Month
Data Transfer Out:10GB/Month
Data Transfer In:10GB/Month
Data Transfer Out to CloudFront:
Let say my use case is i want to upload a file, store it in S3 s long as i want it, i will download it whenever i want, i will modify the file and these operation i will do from across the world from mobile, laptop through my app/website.
You pay for all traffic going out of AWS (Data Transfer Out). You also pay for inter-region traffic.
Let's say you have a S3 bucket in Virginia and an EC2 in Oregon. This EC2 downloads a 100MB file from that bucket. You'll pay 100MB of inter-region.
If you download the file from your PC, you pay 100MB of transfer out. You always pay for what goes out or to another region. If you partially download a file, you'll be charged that exact amount. That's basically it.

AWS Bandwidth data transfer out beyond the global free tier dramatically increased

I'm new to AWS. I launched a EC2 instance and some S3 buckets in April.
The cost of AWS in April and May are normal, but the cost of AWS in June are doubly increased.
I went to the Bills Page to check and I found that the data transfer is abnormal.
Here are the pictures about the cost in May and June:
I didn't change anything except the ssh setting of EC2's (myip -> anywhere).
Can anyone tell me where should I check my setting first?
I assume you are referring to:
Data Transfer in May: 48 GB for $4.36
Data Transfer in June: 319 GB for $28.71
Data Transfer is charged for outbound traffic to the Internet. The AWS Free Usage Tier provides an initial 15GB at no charge. Thereafter, the charge depends upon your Region. It appears that you are in the USA, where the rate is $0.09/GB.
There has been no price increase on AWS. In fact, AWS just announced their 62nd price reduction. Rather, the cause of the increased charge is the fact that your account consumed more data transfer in June (319 GB) than in May (45 GB).
Data transfer would include users on the Internet accessing your web servers, any downloads from AWS (eg from Amazon S3) and everything else causing data to go from AWS to the Internet.
If you think this is too high, you should examine the services you are running and, in particular, make sure you are not serving large content from Amazon S3.

AWS S3 pricing - data transfer in/out

I am planning to store objects in S3 standard storage, each object could be of 100MB in size so monthly it could go upto 1TB. I will use a single region to store these objects in S3.
I want to create a mobile app to store and fetch this objects using post/get apis.
And then show them in my app.
S3 uses different pricing sections, I understand storage and requests (post/get) pricing.
My question is around data transfer in/out pricing, in my case above will I be billed for data transfer in/out? if no why not?
Yes, you will be billed because you mobile app will connect from internet. Even connected from within AWS there are fees associated with your number of requests and data transferred (inside region or outside region).
You can use the AWS Calc to get an estimate for the cost associated: https://calculator.s3.amazonaws.com/index.html
All traffic FROM mobile phones to S3 or EC2 is free.
All traffic TO mobile phones from S3/CloudFront is billed according to a selected region. Take a look at https://aws.amazon.com/s3/pricing/.
Keep in mind that incoming traffic (to S3) is free only if you're NOT using S3 Transfer Acceleration.