Exciting times for New Zealand!
AWS Local Zones is now available in Auckland, New Zealand. You can now use AWS Local Zones in Auckland to deliver applications that require single-digit millisecond latency or local data processing.
Ofcourse I could not wait to deploy some resources in there and see whats what.
Lets get into it!
Enabling the local zone
In order for us to be able to make use of the zone we must enable it in the AWS EC2 console.
Log into the AWS console and browse to the EC2 dashboard.
Ensure that you are in the Asia pacific Sydney region ap-southeast-2
In the EC2 dashboard, in the account attributes pane (top right) click on zones.
That will take us to the zones settings page, in there click on manage for the ap-southeast-2-akl-1
zone.
Change the setting for the zone from Disabled to Enabled and click on “update zone group”
Confirm by typing ‘Enable’ and clicking “OK”.
After a short while (approximately 30 to 60 seconds) you will see the Zone status change from Disabled to Enabled.
Congratulations, you have now enabled the zone for your account.
Creating the Subnet
Before we can deploy resources like an EC2 instance into the zone, we first need to have a subnet that is deployed in the local zone.
For this we will have to go to the VPC dashboard
I already have a VPC in my account, it’s the default VPC and it uses CIDR 172.31.0.0/16
It came with three subnets, one for each availability zone in ap-southeast-2
To create a new subnet in the Auckland local zone click on Create Subnet
button on the top right.
That takes us to the subnet creation page, there we can fill in the details for our new subnet. Make sure you select the correct VPC, easy in my case as I have only one. Give it a descriptive name, I am in the habit of naming my subnets using their purpose and location.
Here are some examples:
public_ap-southeast-2a
private_eu-central-1b
database_us-east-2c
For this new subnet in the local zone I landed on public_ap-southeast-2-akl-1a
Then for the availibility zone click the drop down box and select the ap-southeast-2-akl-1a
AZ which is now availble from the drop down list due to us enabling it earlier.
The CIDR speaks for itself, I picked the logical continuation of the currently used CIDRS which is 172.31.48.0/20
1
2
3
4
5
6
[
"172.31.0.0/20",
"172.31.16.0/20",
"172.31.32.0/20",
"172.31.48.0/20"
]
Click “create Subnet” and that leaves us with a brand new Subnet deployed in the new Auckland Local Zone.
Deploying EC2 into the Local Zone
Almmost there, now that there is an actual subnet lets deploy an EC2 instance into it.
MEPoint your browser back to the EC2 console and Launch an instance.
For the settings I chose a T3.MEDIUM
running amazon linux 2023 and named it Auckland-test
The exciting part is in the “Network Settings” in there make sure you select the correct VPC and subnet. Because I want to ping it from my local machine I also enable ICMP from everywhere. Once I check everything is correct I click “launch Instance”
!! Calamity !!
What happened here?
On further inspection it becomes clear to me that I tried to deploy an instance with an GP3 EBS volume which is not supported in the local zone.
The Local Zone Features overview on the AWS page shows what is available where.
For Auckland that means
- T3, C5, R5, G4dn*, and M5 instance types.
- General Purpose SSD (gp2) storage
- AWS Shield (standard)
- Amazon ECS
- Amazon EKS
- Amazon VPC
- Amazon Direct Connect
No ELB’s as of yet, but I expect those to arive soon.
I edit the instance config and change the storage type from GP3
to GP2
!!Success!!
We now have an EC2 instance running in the new Auckland local zone.
I have also deployed an exact copy of this server in the sydney region for comparison.
Speed comparison
Lets see if we can tell the difference:
I am located in Wellington.
As we can see, the difference is substantial.
Sydney has an average ping time of 46.416 ms, where as Auckland has an average of 12.588 decreasing the latency with about 30 ms which is approximately 2/3rds.
To satisfy my curiosity I also pinged between the instances and here was the result:
As you can see, the average time between both comes to about 30 to 35 ms. This is the time it takes to jump the Tasman and back, add that number to the speed from my laptop to the Auckland instance I get the average I am used to pinging resources in Sydney, so an expected result.
I hope this was informative and I wish you all many happy deployments in our new local zone.