Is the data traffic between EC2 and Lightsail free (in EC2 billing)? - amazon-web-services

I looked at the pricing pages for both EC2 and Lightsail but could not find anything.
I am more concerned about data bills on EC2 side as EC2 data is much more expensive.
I can relocate servers to be in the same region if that helps reduce cost.

Data between Regions is definitely charged at full Data Transfer prices.
Data within the same Region but in different AZs would be charged at 1c/GB (possibly 2c/GB since it might be charged from both ends).
The lowest-cost option would be to establish VPC Peering between Lightsail and your VPC, and having the resources in the same AZ. This should (?) eliminate any Data Transfer charge.
This might be helpful: Understanding Data Transfer in AWS - The Duckbill Group

Related

AWS EC2 magically routes to S3 using private IP

I've deployed an EKS cluster, each of the EC2 instances has its own public ip and all attached to the same VPC.
The routing table for each of the EC2 instances subnets looks as follows:
Destination | Target
----------------------------------------
192.168.0.0/16 | local
0.0.0.0/0 | igw-06d8c484aaba8d136
So if I understand correctly, every time I read from an S3 bucket (in the same region or not), it should be routed using the internet gateway to the internet, and if that's the case, I should see charges for it.
However, I don't see any charges for it, I tough that maybe AWS network magically taking care of these routings but they actually provide another solution and these rules aren't in any of the routing tables.
Not that I'm against free services, but I prefer to understand this before reading lots of data
Perhaps you are still in the AWS free tier (12 months free) with 20,000 get requests free and 2,000 put requests free source
EDIT:
As you say the free stuff does appear in cost explorer.
However, if EC2 instance and S3 bucket are in the same region, the requests should be free regardless of endpoints, if you have this setup, I think that's the explanation.
This article summarises it quite nicely.
I would recommend setting up an s3 endpoint if you wish to keep internal transfer costs down after your free tier expires though, it's also great for performance.

Getting AWS Data Transfer charges to regions outside my servers region

My ec2 instance is getting charged for data transfer from almost every available AWS region (Tokyo, Seoul, Singapore, Paris, London, Germany, Ireland, Ohio, Oregon, Sydney, Canada Central, Sao Paulo, Cloud Front, INCLUDING AWS GovCloud (US)). our 99.99% users are from India. As per recommendations of AWS representative have checked no other script are running on our instance and have changed rules for security group inbound rule having only SSH connection on port 22 to static IP. But still, there is data transfer of almost 600GB+. And the documentation for security group doesn't help much is there any other way to stop this data transfer?
Please note that EC2 instance runs the php code and java api tomcat7 service & RDS is on other instance.
First, your question looks like you mention data transfer to other EC2 instances in another region. Perhaps you meant traffic to internet users in other regions?
Second, according to pricing you'll be billed for Data Transfer OUT From Amazon EC2 To Internet whichever region you are and regardless whether the endpoint is in internet or AWS region. So, even if you have users in Mumbai you'll be billed for outbound traffic anyway.
Third, if you want to block transfer on country basis use CDN with proper capability, e.g. CloudFlare.
Please elaborate your question if you meant something else.

Can you explain AWS billing rates on data transfer

To design a system I need to decide on where to deploy the instances (suppose that I don't really care where they are but only want to optimize costs).
The on-demand page mentions several billing items:
Data Transfer IN To Amazon EC2 From Internet
Data Transfer OUT From Amazon EC2 To Internet
Data Transfer OUT From Amazon EC2 To (a list of regions)
Data Transfer Across AZ within this Region
My questions:
About item 1 - they say this is free, is it? does it make sense that from Internet to Amazon is free while from Amazon to Amazon is not free? (I'm talking on the inbound data here, not the outbound).
In items 2-3: does "Amazon" refer to all AWS services, including another EC2 instance?
Regarding item 4: it is written "Data transferred "in" to and "out" of Amazon EC2, Amazon RDS, Amazon Redshift , Amazon DynamoDB Accelerator (DAX), and Amazon ElastiCache instances or Elastic Network Interfaces across VPC peering connections in the same AWS region is charged at $0.01/GB." Is that meaning that if I run a process between 2 EC2 instances on the same region then I pay for each GB twice? first for outbound from one instance and second for the inbound on the other instance.
The simple rules-of-thumb are:
Inbound traffic from the Internet to the AWS Cloud is free.
Outbound traffic from the AWS Cloud to the Internet is charged at the applicable rates in each region (this is the majority of the cost). This applies to anything that sends traffic out to the Internet from your AWS services.
Outbound traffic from the AWS Cloud to Amazon CloudFront has a lesser rate
Traffic within a region but between Availability Zones is 1c/GB in each direction. In fact, the wording on the EC2 Instance Pricing page now shows this.
To answer your specific questions:
Inbound is free
Outbound is for any AWS service that sends traffic to the Internet
Traffic between AZs or via VPC Peering is charged in "each direction"

Amazon EC2 Windows EBS and bandwidth charges

I would like to know how Amazon EC2 charge for EBS and the bandwidth for Windows and I want to know the how many Tomcat web servers and MySQL servers can be placed in one EC2 server.
Pricing references:
Amazon EC2 Pricing
Amazon EBS Pricing
Amazon EBS (Elastic Block Store) is priced according to the size of the volume and the type of volume. See the above pricing links for more details. Note that the amount is charged based on provisioned storage, which means the full disk size is charged rather than just the proportion of the volume that is used.
There is no specific charge for bandwidth for Amazon EC2 instances, however traffic that is leaving a region and going to the Internet (from any service, including EC2) is charged for Data Transfer. For details, see the Data Transfer OUT From Amazon EC2 To Internet section of the Amazon EC2 Pricing page.
Also there is a restriction on the network bandwidth assigned to any Amazon EC2 instance. Basically, larger instances have more bandwidth. See the Networking Performance column on the Instance Types Matrix. While no specific bandwidths are given, relative measures are provided (eg "Low to Moderate", "High"). Some large instance types (eg m4.10xlarge) have 10 Gigabit bandwidth between instances (but not necessarily out to the Internet).
The number of Tomcat web servers and MySQL servers that can be placed in one EC2 server is totally dependent upon your particular situation and the Instance Type chosen. For example, a heavily-used application and database will require more resources. Experimentation and performance testing would assist in making this decision.
Also, if you wish to run MySQL, you might consider using Amazon RDS (Relational Database Service) to provision a fully-managed database instead of installing and maintaining one on your own EC2 instance.

bandwith charge between ec2 and RDS

I'm using aws to run php app and it works good.
But I have a question: Does Any one knows if accessing to RDS from ec2 in the same region can trigger bandwith charge ?
Thanks.
If both the RDS and EC2 servers are in the same availability zone then there is no data transfer charge. If they are in different availability zones then there is the standard data transfer charge on the EC2 instance, but no transfer charge on the RDS instance. In addition, there is no charge for RDS data replication between availability zones.
This information used to be on this page, but now I can't find it. You can see some of this information in the RDS FAQ page. There is also a discussion thread on the official RDS forum here.