Object Storage - Get started with Private Endpoint (Beta)
Find out how to access your Object Storage buckets privately from a Public Cloud Private Network, with no public connectivity needed, using a Private Endpoint
Beta feature. Private Endpoint for Object Storage is currently in Beta. Features, API routes and field names may change before General Availability, and this guide will be updated accordingly. During the Beta, you can manage your Private Endpoints from the OVHcloud Console, through the OVHcloud API or with Terraform. This guide covers the Console and the API.
Objective
A Private Endpoint lets the resources on a Public Cloud Private Network subnet reach your S31-compatible Object Storage over the OVHcloud network, without a Gateway. Your traffic stays private and needs no public connectivity.
This guide explains how to create a Private Endpoint, connect your S3 client to it, and make sure your buckets can only be reached through this private path.
Private Endpoint is only available for S3-compatible Object Storage. Swift-based Object Storage is not supported.
Requirements
- A Public Cloud project in your OVHcloud account
- A Public Cloud Private Network and subnet, active in the region where you want to create the Private Endpoint, with one free IP address
- An Object Storage user and bucket
- Access to the OVHcloud API, the OVHcloud Console or Terraform
The clients that use the Private Endpoint are the resources in this subnet, such as instances or Bare Metal servers connected through the vRack.
OVHcloud Console Access
- Direct link:
- Navigation path:
Public Cloud> Select your project >Network>Private Endpoint
Instructions
How it works
When you create a Private Endpoint, OVHcloud places it in the subnet of your choice and gives it:
- a private IP address (VIP) in this subnet;
- a hostname, in the form
pe-<pe_id>.s3.{region}.endpoint.cloud.ovh.net.
Your instances then send their S3 requests to this hostname instead of the public Object Storage endpoint. Your credentials (access key and secret key) do not change.
Traffic is encrypted with TLS all the way from your S3 client to Object Storage. The Private Endpoint forwards it without decrypting it.
A Private Endpoint has two identifiers. Make sure you use the right one:
Using the API: how it works and routes used in this guide
Private Endpoint uses OVHcloud API v2. Instead of performing actions one by one, you describe the configuration you want in a targetSpec object. OVHcloud then applies it in the background. You can follow its progress with the resourceStatus field, and the currentTasks list shows the operations in progress.
The routes used in this guide are the following:
You do not need any local tool to run these calls: you can run them directly from the . Open the route, fill in projectId and the request body, then click Execute. In the same way, you can follow the creation of your Private Endpoint with the GET route, and list the available service names and connectivity tiers with the serviceAvailability route.
Step 1 - Choose a connectivity tier
Each Private Endpoint has a connectivity tier, which determines its bandwidth:
The bandwidth values apply to the Beta and may change.
Beta limitations. During the Beta:
- only the S tier is available;
- you can create up to 2 Private Endpoints per project. If you need more, contact us;
- Private Endpoints are free, and no SLA applies;
- Private Endpoint is available in the following regions: GRA, RBX, SBG, EU-WEST-PAR, EU-SOUTH-MIL, LIM and BHS.
You choose the tier when creating the Private Endpoint (see Step 2), in the Service & size section of the creation form:
- In Service, select
S3. The list shows the services available in the region of the Private Network you selected. - In Size, select the tier. Tiers are shown as sizes: during the Beta, select S.
Step 2 - Create the Private Endpoint
Before you start, decide how the Private Endpoint hostname will be resolved. You make this choice when creating the Private Endpoint, with the Public DNS option (publicDnsEnabled in the API):
The details for each option are given in Step 3.
- Open
Public Cloudand select your project, then openNetwork>Private Endpoint. - Click
Create a Private Endpoint. - In the Private Endpoint name section, enter a name for your Private Endpoint.
- In the Connectivity section:
- select your Private network. The region of the Private Endpoint is the region of this Private Network;
- select the Subnet in which to place the Private Endpoint;
- optionally, enter an IP address of your choice in VIP selection. If you leave it empty, an address in the subnet is assigned automatically.
- In the Service & size section, select the service
S3and the connectivity tier (see Step 1). During the Beta, only S is available. - In the Public DNS section, turn the switch on or leave it off, according to your choice above.
- Optionally, add a Description.
- Check the summary on the right, then click
Create a Private Endpoint.
The Private Endpoint is created in the background, and is listed on the Private Endpoints page. It is ready when its status is READY.
Click its name to open its details page, and write down the following values: you will need them in the next steps.
- ID, in the General information section: the Private Endpoint ID (
pe-…); - Endpoint VIP, in the Connection details section: its IP address in the subnet;
- Hostname, in the Connection details section.
Each value has a copy button next to it.
Step 3 - Set up name resolution
The standard public endpoint of Object Storage (s3.{region}.io.cloud.ovh.net) is not automatically redirected to your Private Endpoint. Your applications must explicitly use the Private Endpoint hostname, for example pe-a1b2c3d4.s3.gra.endpoint.cloud.ovh.net.
What you do depends on the Public DNS choice you made in Step 2:
- Public DNS on: there is nothing to configure. Go to Step 4.
- Public DNS off: in your DNS service, for example a private DNS zone, point the following names to the IP address of the Private Endpoint (Endpoint VIP in the Console,
currentState.vipAddressin the API):pe-<pe_id>.s3.{region}.endpoint.cloud.ovh.net;*.pe-<pe_id>.s3.{region}.endpoint.cloud.ovh.net, which covers URLs that include the bucket name.
Step 4 - Connect your S3 client to the Private Endpoint
Once the Private Endpoint is READY, replace the Object Storage endpoint in your S3 client with the Private Endpoint hostname. In the examples below, replace pe-a1b2c3d4.s3.gra.endpoint.cloud.ovh.net with your own hostname.
To avoid adding --endpoint-url to each command, you can save the endpoint in a profile in ~/.aws/config:
You can keep using the access key and secret key of your existing Object Storage user.
Step 5 - Restrict access to your buckets to the Private Endpoint
Creating a Private Endpoint gives your instances a private path to Object Storage, but it does not block access from the public endpoint. To make the Private Endpoint the only way to reach your data, add a restriction to the policy of your Object Storage user.
The following statement denies every request that does not go through your Private Endpoint. Replace pe-<pe_id> with your Private Endpoint ID, shown in the ID field of its details page in the Console, or in the currentState.endpointId field of the API:
In aws:SourceVpce, use the Private Endpoint ID, including the pe- prefix. Copy the value of the ID field in the Console, or of currentState.endpointId as it is: it already includes the prefix. For example, with "endpointId": "pe-9d34106b", use "aws:SourceVpce": "pe-9d34106b".
Do not use the resource ID (UUID) returned by the API, and do not leave out the pe- prefix. Otherwise, the condition never matches and the user is blocked on every path, including through the Private Endpoint.
If your user already has a policy, add this statement to its existing Statement list rather than replacing it.
To apply the policy, use one of the following methods.
The Console does not yet offer a dedicated option for Private Endpoints, but you can edit the user's policy as a JSON file:
- In the
Object Storagesection, open the users tab and download the current policy of your user (Download the policy). - Add the statement above to the downloaded file.
- Import the updated file on the same user (
Import a policy).
For more details, see our guide on identity and access management.
Once this policy is applied, the user can no longer access Object Storage through the public endpoint, from anywhere. Before applying it to a production user, test it on a dedicated user and check that your applications reach Object Storage through the Private Endpoint.
Step 6 (optional) - Reach the Private Endpoint from several subnets
A Private Endpoint is placed in a single subnet. If instances in other subnets of the same Private Network also need private access to Object Storage, you have two options:
- Create one Private Endpoint per subnet. This is the simplest option and requires no routing. During the Beta, Private Endpoints are free, but each one counts against the limit of 2 Private Endpoints per project.
- Use a single Private Endpoint and a router instance. Place the Private Endpoint in one subnet, and route traffic from the other subnets through a dedicated router instance connected to these subnets. A single Private Endpoint serves all your subnets, but you have to manage the router instance yourself.
Instances in Subnet A reach the Private Endpoint directly. Instances in Subnet B reach it through the router instance that connects the two subnets.
Manage your Private Endpoints
OVHcloud IAM controls who can view, create, edit and delete Private Endpoints. The actions apply to the Public Cloud project (publicCloudProject resource type):
publicCloudProject:apiovh:privateEndpoint/getpublicCloudProject:apiovh:privateEndpoint/createpublicCloudProject:apiovh:privateEndpoint/editpublicCloudProject:apiovh:privateEndpoint/deletepublicCloudProject:apiovh:reference/privateEndpoint/serviceAvailability/get
Only the name and description can be changed. The tier, the Private Network and the subnet cannot be changed after creation: to change them, create a new Private Endpoint, then delete the old one.
Open Network > Private Endpoint. The page lists the Private Endpoints of your project, with their region, Private Network, subnet, service, size, VIP, hostname and status. Use Search to find one.
Change the description: click the name of the Private Endpoint, then click the pencil icon next to Description in the General information section.
Delete a Private Endpoint: click the bin icon in the Actions column of the list, or click Delete on the details page of the Private Endpoint.
If your Object Storage user policy only allows access through this Private Endpoint (see Step 5), update the policy before deleting the Private Endpoint. Otherwise, the user will no longer be able to access your buckets.
Coming soon
The following features are planned after the Beta:
- restricting access to your buckets with bucket policies;
- restricting access to your buckets with OVHcloud IAM policies, once Object Storage is integrated into OVHcloud IAM.
Go further
Object Storage - Identity and access management
Object Storage - How to connect Object Storage buckets with other resources in a vRack
For training or technical assistance implementing our solutions, contact your sales representative or visit our Professional Services page to request a quote and have your project analysed by our experts.
Join our community of users.
1: S3 is a trademark of Amazon Technologies, Inc. OVHcloud's service is not sponsored by, endorsed by, or otherwise affiliated with Amazon Technologies, Inc.