To better protect your database connection, you can connect to a private endpoint using the Astra DB console.
For details about using API calls instead, see Connect to AWS Private Link with the DevOps API.
This information applies to only serverless databases.
Also, Private endpoints are available for only intra-region use. The *region for your private endpoint in AWS and your Astra DB database must match*.
For pricing related to using private endpoints, see Pricing and billing.
The following roles can manage private endpoints:
Organization Administrator
Database Administrator
Alternatively, you can use a custom role with permissions to manage private endpoints.
For more about AWS PrivateLink, see VPC endpoint services (AWS PrivateLink).
- Access to your existing AWS organization and account.
- Create your Astra DB database using the Astra DB console.
- Ensure you have permission to manage private endpoints.
- Take note of which *region* your AWS organization and AWS-based Astra DB use (the chosen region *must match*).
In AWS, only VPC owners can create resources such as VPC endpoints, subnets, route tables, and NACLs. Participants cannot view, modify, or delete resources that belong to other participants or the VPC owner. Thus a user cannot create resources, including a private endpoint, in a shared VPC that is owned by a different AWS account. To see which account owns your VPC, look at the Owner ID in the AWS Console. Example:
For more, see Work with shared VPCs - Amazon Virtual Private Cloud.
To increase your security, restrict public access to your database using the access list.
Setting up the connection between AWS and Astra DB private endpoints involves a few steps in both consoles.
Let’s start in Astra DB console
- On your organization's Astra DB dashboard, click the link for your active, AWS-based database.
- Navigate to your database's *Settings* tab, and notice the *Private Endpoints* section. At this point, no endpoints have been linked. Example:
- Click *Configure Region* and enter your AWS account's Amazon Resource Name (ARN), which includes your AWS account number, in this format:
- After entering the ARN, click *Configure Region*.
- Astra DB console displays an updated Private Endpoints section.
- Click *Add Endpoint*.
- On *Add Private Endpoint*, copy the generated *Service Name*.
In Astra DB console, keep the *Add Private Endpoint* dialog open. We'll return here with an *Endpoint ID* after creating it in AWS console.
Switch over to AWS console
- After authenticating into your AWS organization and account, start on ttps://console.aws.amazon.com/vpc/home?region= <your-region-here> #Endpoints:sort=vpcEndpointId or search in AWS console for "Create Endpoint".
- Click *Create Endpoint*.
- On the AWS *Create Endpoint* dialog, choose or enter:
- Click *Create endpoint*.
- Click *Verify* to ensure the Service Name is found. Example after verification:
- Once accepted, AWS displays data for the added endpoint. *Copy* the generated Virtual Private Cloud (VPC) ID. You'll need to paste in that *VPC ID* value in Astra DB console.
Return to Astra DB console
Back in Astra DB console, return to the *Add Private Endpoint* dialog that's available from your databases's Settings.
- In the Endpoint ID field, paste in the copied *VPC ID* value. Also enter a brief description of your Astra DB / AWS endpoint.
- Click *Add Endpoint*.
Your private endpoint is defined. However, notice the warning message if you have not taken further action in your Astra DB Settings.
You’ve set up a private endpoint for this database, but access to your database is still open to the public. Learn how to Manage access lists for public access by using the *IP Access List options in Astra DB console Settings*. You can enable the Restrict public access toggle, and you can manage endpoints with one or more access lists.
You can alias your private endpoint with a DNS record to use as your hostname in the Astra DB secure connect bundle. Here are the steps:
- Download your secure connect bundle for the region of your choice. Get your latest secure connect bundle.
- Unzip the secure connect bundle.
- In config.json , copy the host key's value.
- In AWS Console:
Once those steps are completed, you can connect to your private endpoint using your updated secure connect bundle. For more, see Drivers for Astra DB.
In AWS console:
- Go to ttps://console.aws.amazon.com/vpc/home?region= <your-region-here> #Endpoints:sort=vpcEndpointId
- Select the checkbox for the endpoint(s) you want to remove.
- From the AWS Actions drop-down menu, choose *Delete Endpoint*.
In Astra DB console:
- Go to the *Settings* tab for your database.
- Choose the endpoint you want to remove.
- Click *Delete*.
What’s next?
- Refer to related topics for other cloud providers that are linked from Connect via a private endpoint.
- Learn how to Manage access lists for public access.
- For more, see AWS PrivateLink.