To get started with AWS Local Zones, you must first enable a Local Zone through the Amazon EC2 console or the AWS CLI. Next, create a subnet in a VPC in the parent Region, specifying the Local Zone when you create it. Finally, create AWS resources in the Local Zone subnet.
Step 1: Enable a Local ZoneFirst, enable the Local Zone that you want to use.
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
From the navigation bar, choose the Regions selector and then choose the parent Region.
From the Amazon EC2 console dashboard, in the Account attributes pane, under Settings, choose Zones.
(Optional) To filter the list of zones, choose the All Zones filter and then choose Local Zones.
Select the Local Zone.
Choose Actions, Opt in.
When prompted for confirmation, enter Enable
and then choose Enable zone group.
Use the describe-availability-zones command as follows to describe all Local Zones in the specified Region.
aws ec2 describe-availability-zones \
--region us-west-2
\
--filters Name=zone-type,Values=local-zone \
--all-availability-zones
Use the modify-availability-zone-group command as follows to enable a specific Local Zone.
aws ec2 modify-availability-zone-group \
--region us-west-2
\
--group-name us-west-2-lax-1
\
--opt-in-status opted-in
When you add a subnet, you must specify an IPv4 CIDR block for the subnet from the range of your VPC. You can optionally specify an IPv6 CIDR block for a subnet if there is an IPv6 CIDR block associated with the VPC. You can specify the Local Zone where the subnet resides. You can have multiple subnets in the same Local Zone.
Open the Amazon VPC console at https://console.aws.amazon.com/vpc/.
From the navigation bar, choose the Regions selector and then choose the parent Region.
In the navigation pane, choose Subnets.
Choose Create subnet.
For VPC ID, select the VPC.
For Subnet name, enter a name for your subnet. Doing so creates a tag with a key of Name
and the value that you specify.
For Availability Zone, choose the Local Zone that you enabled.
Specify the IPv4 CIDR block for the subnet.
(Optional) Specify an IPv6 CIDR block for the subnet. This option is available only if an IPv6 CIDR block is associated with the VPC.
(Optional) To add a tag, enter the tag key and tag value. Choose Add new tag to add another tag.
Choose Create subnet.
Use the create-subnet command as follows to create a subnet for the specified VPC in the specified Local Zone.
aws ec2 create-subnet \
--region us-west-2
\
--availability-zone us-west-2-lax-1a
\
--vpc-id vpc-081ec835f303f720e
After you create a subnet in a Local Zone, you can deploy AWS resources in the Local Zone.
The following example shows how to select a supported instance type and then launch an Amazon EC2 instance in a Local Zone using that instance type.
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
In the navigation pane, under Instances, choose Instance Types.
In the search field, choose Availability zones, choose Contains, and then enter the zone name (for example, us-west-2-lax-1
.) Select the first item, or whichever item has just this zone ID and the Availability Zones for the parent Region.
Select one of the instance types, and then choose Actions, Launch instance.
Under Name and tags, enter a descriptive name for the instance (for example, my-lz-instance). Doing so creates a tag with a key of Name
and the value that you specify.
Under Application and OS Images (Amazon Machine Image), do the following:
Select an operating system for your instance.
Select the Amazon Machine Image (AMI). An Amazon Machine Image (AMI) is a basic configuration that serves as a template for your instance.
Select the Architecture.
Under Key pair (login), choose an existing key pair or create a new one. This is required if you want to connect to your EC2 instance.
Next to Network settings, choose Edit, and then:
Select your VPC.
Select your Local Zone subnet.
Enable or disable Auto-assign public IP.
Create a security group or select an existing one.
You can keep the default selections for the other configuration settings for your instance. To determine the storage types that are supported, see the Compute and storage section in AWS Local Zones features.
Review a summary of your instance configuration in the Summary panel, and when you're ready, choose Launch instance.
A confirmation page lets you know that your instance is launching. Choose View all instances to close the confirmation page and return to the console.
On the Instances screen, you can view the status of the launch. It takes a short time for an instance to launch. When you launch an instance, its initial state is pending
. After the instance starts, its state changes to running
and it receives a public DNS name. If the Public IPv4 DNS column is hidden, choose the settings icon ( ) in the top-right corner, turn on Public IPv4 DNS, and choose Confirm.
It can take a few minutes for the instance to be ready for you to connect to it. Check that your instance has passed its status checks; you can view this information in the Status check column.
Use the describe-instance-types command.
aws ec2 describe-instance-type-offerings \
--filters Name=location,Values=us-west-2-lax-1a
\
--location-type availability-zone \
--query InstanceTypeOfferrings[*].InstanceType
To launch an EC2 instance in a Local Zone subnet
Use the run-instances command.
aws ec2 run-instances \
--region us-west-2
\
--subnet-id subnet-08fc749671b2d077c
\
--instance-type t3.micro
\
--image-id ami-0abcdef1234567890
\
--security-group-ids sg-0b0384b66d7d692f9
\
--key-name my-key-pair
When you are finished with a Local Zone, delete the resources in the Local Zone. To disable a zone group, you must contact AWS Support. Open a case titled "Disable zone group" and provide the name of the zone group.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4