Deploy resources in an AWS Wavelength Zone by using Terraform
Created by Zahoor Chaudhrey (AWS) and Luca Iannario (AWS)
Code repository: terraform-wavelength-infrastructure | Environment: PoC or pilot | Technologies: Networking; Infrastructure; Content delivery; Web & mobile apps |
AWS services: Amazon EC2; Amazon VPC; AWS Wavelength |
Summary
AWS Wavelength helps you build infrastructure that is optimized for Multi-Access Edge Computing (MEC) applications. Wavelength Zones are AWS infrastructure deployments that embed AWS compute and storage services within communications service providers’ (CSP) 5G networks. Application traffic from 5G devices reaches application servers running in Wavelength Zones without leaving the telecommunications network. The following facilitate network connectivity through Wavelength:
Virtual private clouds (VPCs) – VPCs in an AWS account can extend to span multiple Availability Zones, including Wavelength Zones. Amazon Elastic Compute Cloud (Amazon EC2) instances and related services appear as part of your Regional VPC. VPCs are created and managed in Amazon Virtual Private Cloud (Amazon VPC).
Carrier gateway – A carrier gateway enables connectivity from the subnet in the Wavelength Zone to the CSP network, the internet, or the AWS Region through the CSP’s network. The carrier gateway serves two purposes. It allows inbound traffic from a CSP network in a specific location, and it allows outbound traffic to the telecommunications network and the internet.
This pattern and its associated Terraform code help you launch resources, such as Amazon EC2 instances, Amazon Elastic Block Store (Amazon EBS) volumes, VPCs, subnets, and a carrier gateway, in a Wavelength Zone.
Prerequisites and limitations
Prerequisites
An active AWS account
An integrated development environment (IDE)
Opt in to the target Wavelength Zone
AWS Command Line Interface (AWS CLI), installed and configured
Terraform version 1.8.4 or later, installed
(Terraform documentation) Terraform AWS Provider version 5.32.1 or later, configured
(Terraform documentation) Git, installed
(GitHub) Permissions to create Amazon VPC, Wavelength, and Amazon EC2 resources
Limitations
Not all AWS Regions support Wavelength Zones. For more information, see Available Wavelength Zones in the Wavelength documentation.
Architecture
The following diagram shows how you can create a subnet and AWS resources in a Wavelength Zone. VPCs that contain a subnet in a Wavelength Zone can connect to a carrier gateway. A carrier gateway allows you to connect to the following resources:
4G/LTE and 5G devices on the telecommunication carrier's network.
Fixed wireless access for select Wavelength Zone partners. For more information, see Multi-access AWS Wavelength.
Outbound traffic to public internet resources.
Tools
AWS services
Amazon Virtual Private Cloud (Amazon VPC) helps you launch AWS resources into a virtual network that you’ve defined. This virtual network resembles a traditional network that you’d operate in your own data center, with the benefits of using the scalable infrastructure of AWS.
AWS Wavelength extends AWS Cloud infrastructure to telecommunication providers’ 5G networks. This helps you build applications that deliver ultra-low latencies to mobile devices and end users.
Other tools
Terraform
is an infrastructure as code (IaC) tool from HashiCorp that helps you create and manage cloud and on-premises resources.
Code repository
The code for this pattern is available in the GitHub Creating AWS Wavelength Infrastructure using Terraform
A VPC
A Wavelength Zone
A pubic subnet in the Wavelength Zone
A carrier gateway in the Wavelength Zone
An Amazon EC2 instance in the Wavelength Zone
Best practices
Before deploying, confirm that you're using the latest versions of Terraform and the AWS CLI.
Use a continuous integration and continuous delivery (CI/CD) pipeline to deploy IaC. For more information, see Best practices for managing Terraform State files in AWS CI/CD Pipeline
on AWS Blogs.
Epics
Task | Description | Skills required |
---|---|---|
Clone the repository. | Enter the following command to clone the Creating AWS Wavelength Infrastructure using Terraform
| DevOps engineer |
Update the variables. |
| DevOps engineer, Terraform |
Initialize the configuration. | Enter the following command to initialize the working directory.
| DevOps engineer, Terraform |
Preview the Terraform plan. | Enter the following command to compare the target state against the current state of your AWS environment. This command generates a preview of the resources that will be configured.
| DevOps engineer, Terraform |
Verify and deploy. |
| DevOps engineer, Terraform |
Task | Description | Skills required |
---|---|---|
Verify the infrastructure deployment. |
| AWS DevOps, DevOps engineer |
(Optional) Clean up the infrastructure. | If you need to delete all of the resources that were provisioned by Terraform, do the following:
| DevOps engineer, Terraform |
Troubleshooting
Issue | Solution |
---|---|
Connectivity to Amazon EC2 instances in the AWS Region. | See Troubleshoot connecting to your Linux instance or Troubleshoot connecting to your Windows instance. |
Connectivity to Amazon EC2 instances in the Wavelength Zone. | See Troubleshoot SSH or RDP connectivity to my EC2 instances launched in a Wavelength Zone |
Capacity in the Wavelength Zone. | |
Mobile or carrier connectivity from the carrier network to the AWS Region. |
|