VPC Lattice connections are in early access and available for BYOC deployments, where Artie runs in a dedicated AWS account and VPC that you provision. Contact us through Slack or email to enable them. For Artie-hosted data planes, use AWS PrivateLink.
How VPC Lattice works
In each VPC that contains a database, you create a resource gateway, plus a resource configuration for each database you want Artie to replicate. You then share the resource configurations with your Artie account through AWS Resource Access Manager (RAM). Artie creates a resource endpoint for each shared database in the Artie VPC and connects through it, without VPC peering, a Transit Gateway, or a load balancer in your VPCs. Connections only go one way. Artie can open connections to the hosts and ports in your resource configurations, and nothing else in your VPC is reachable. Your database sees traffic coming from the resource gateway’s private IP addresses inside its own VPC.When to use VPC Lattice
The AWS Well-Architected Framework recommends separating workloads and environments into separate AWS accounts (best practice SEC01-BP01, Separate workloads using accounts). Accounts are a strong boundary for security, billing, and access. A BYOC deployment follows the same practice by running Artie in its own account. Your databases often end up spread across many other accounts, in VPCs that aren’t peered with each other or with the Artie VPC. AWS PrivateLink needs an endpoint service and a Network Load Balancer in every VPC that contains a database. VPC Lattice replaces those with a resource gateway and a resource configuration for each database, which you can deploy the same way in every account. Use VPC Lattice when:- Your databases are in AWS accounts other than your Artie account, or in VPCs that aren’t connected to the Artie VPC.
- You want each workload account to control exactly which databases Artie can reach, through its own RAM share.
- Your databases are on Amazon RDS or Aurora, and you want connections to keep working through failover without maintaining NLB target groups.
What you’ll need
- A BYOC deployment of Artie, and the account ID of your Artie account
- Databases in the same AWS region as the Artie VPC. Resource configurations in another region can’t be reached from the Artie VPC.
- Permission to create VPC Lattice resource gateways, resource configurations, and AWS RAM resource shares in each workload account
- A subnet in at least one of the Artie VPC’s availability zone IDs, in every VPC that contains a database
Setting up a VPC Lattice connection
Repeat steps 1 to 4 in each workload account that contains databases you want to replicate.1
Create a resource gateway
In the AWS console, go to VPC > PrivateLink and Lattice > Resource gateways and create a resource gateway in the VPC that contains your databases. Select subnets in as many availability zones as possible, and include at least one subnet in an availability zone ID that the Artie VPC also uses. Without a shared availability zone, connections from Artie time out. See Verify availability zone IDs overlap.Attach a security group that allows outbound TCP traffic to your databases on their ports (e.g.
5432 for PostgreSQL or 3306 for MySQL).2
Allow the resource gateway in your database security group
Add an inbound rule to each database’s security group that allows TCP traffic on the database port from the resource gateway’s security group. Without this rule, connections from Artie time out.
3
Create a resource configuration for each database
Go to VPC > PrivateLink and Lattice > Resource configurations and create one resource configuration for each database, associated with the resource gateway from step 1.
- For Amazon RDS and Aurora, use the ARN type and select the database. The database has to be private. VPC Lattice rejects a resource configuration for a publicly accessible database. Artie can then connect with your usual RDS endpoint hostname, and the connection keeps working through failover.
- For other databases, such as a self-managed database on EC2, use the Single type with the database’s domain name or private IP address and port.
4
Share the resource configurations with your Artie account
Go to Resource Access Manager > Create resource share. Add the resource configurations from step 3 and add your Artie account ID as a principal.If resource sharing with AWS Organizations is turned on in RAM, the share is available immediately. Otherwise, your Artie account receives an invitation, and we accept it.
5
6
Create your pipeline
Once we confirm the connection, create a pipeline. For ARN resource configurations, use your database’s RDS endpoint hostname as the source address. For other resource configurations, we will send you the hostname to use.
Example: Terraform for one workload account
If you manage many accounts, define these resources once and deploy them to every workload account with Terraform or CloudFormation StackSets. This example uses the AWS provider 5.85.0 and later, and shares one private RDS PostgreSQL instance with an Artie account in the same AWS Organization.terraform apply, send us the artie_resource_share_arn and artie_resource_configurations values from terraform output -json.
Troubleshooting
Advanced debugging: connection is timing out
Advanced debugging: connection is timing out
Work through these checks in order.
Verify availability zone IDs overlap
VPC Lattice requires at least one availability zone in common between the resource endpoint in the Artie VPC and your resource gateway. If there is no overlap, traffic has no path and the connection will time out.Check both security groups
The resource gateway’s security group needs an outbound rule to the database port, and the database’s security group needs an inbound rule from the resource gateway’s security group. Your database sees connections coming from the resource gateway’s IP addresses, not from the Artie VPC, so rules that only allow the Artie VPC’s CIDR won’t match.Check how the resource gateway resolves DNS
If a Single resource configuration uses a domain name that resolves through a Route 53 private hosted zone or your own DNS server, the resource gateway’s DNS resolution must be set toIN_VPC. This setting can only be chosen when you create the resource gateway.