Showing posts with label AZs. Show all posts
Showing posts with label AZs. Show all posts

Saturday, August 10, 2013

Traffic costs between EC2 instances, AZs, and VPCs

Often times when running on AWS you will have multiple AZs, accounts and VPCs.  This is a simple summary of EC2 data transfer costs:

1. Within the same AZ  : Free: It is within the same AZ and over private IP.
2. Between two AZs :   Cost. Will incur inter-az charges for both inbound and outbound
3. Between Accounts in different VPCs :  Cost. Inter-az charges are applicable for data transfer charges between instances in the different AZ's (same region) and in different accounts.
4. Between one EC2 classic instance and VPC EC2 instance in a same AZ : Cost
5. Instances to S3 in the same region: Free
6. Instance to S3 in different region: Cost. cross region charges

VPC and AZs when using ELB and Auto Scaling


Here are a couple of things to be aware of when using Auto Scaling, VPC, and ELB with Auto Scaling:

1. There is a limitation on ELB in regards to AZs and subnets.   You can only have one subnet per AZ.  You will most likely be creating an ELB (and using VPC) when using Auto Scaling so it is important to understand this.
2. When creating an autoscaling group (as-create-auto-scaling-group), make sure to specific the VPC subnets and AZs if you are using .  The VPC subnets need to be in the AZs specified in the AZ parameter for the as-create-auto-scaling-group command. No checking is done to make sure this is true so it is up to you to make sure these AZs actually exist in the subnets you specify. 

Thursday, May 30, 2013

AWS data transfer costs

Some times instance reside in different AZs and these instances need to share data. Instances also use S3 for things like backups. Here is breakdown of data transfer cost for some typical scenarios: 
1. Instance to Instance in same AZ 
Cost: Free
2. Instance to Instance in different AZ
Cost: Inter-AZ charge for both inbound and outbound
3. Instance to Instance in different account in same or different AZ
Cost: Inter-az charges are applicable for data transfer charges between instances in the different AZ's (same region) and in different accounts
4. Instance to S3 in the same region
Cost: Free