DevZero Logo
DevZero

Connecting to AWS

Connecting to AWS network from a DevZero workspace.

If you're more of a visual learner, check out the video tutorial!

Create a VPC

Go to VPC > Your VPCs > Create VPC.
Select VPC and more.
Enter a tag name to auto-generate VPC and Subnet Names. Customize the IPv4 CIDR block if needed.
Select "In 1 AZ" in the NAT Gateways section.

Create an EC2 "relay" router

Use one of the supported linux distros.
In the Network Settings, edit the VPC to assign the one you created above.
Assign the instance to a public subnet of the VPC, and assign it a public IP address.
In the security groups configuration, edit the Security Group to allow inbound ssh (Port range = 22, Source = 0.0.0.0/0). We’ll need this during initial setup but can close the firewall later.‍

SSH into the machine and Install the DevZero CLI from the script:

curl -fsSL https://get.devzero.io | sh

Log into your account by executing:

sudo dz auth login && sudo dz net connect

Enable IP forwarding to access resources on private subnets:

echo 'net.ipv4.ip_forward = 1' | sudo tee -a /etc/sysctl.conf
echo 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a /etc/sysctl.conf
sudo sysctl -p /etc/sysctl.conf

Connect to DevZero network:

sudo dz net connect --ssh --advertise-routes=<VPC_CIDR>

Verify that the machine is connected to your DevZero network:

dz net status

You should see the EC2 machine hostname.

You should now be able to ping or ssh private AWS resources from your DevBox:

ping <ip_address>

Video Walkthrough

On this page