For AI agents: the complete documentation index is available at https://docs.ovhcloud.com/en/llms.txt, the full documentation bundle is available at https://docs.ovhcloud.com/en/llms-full.txt, and this page is available as Markdown at https://docs.ovhcloud.com/en/guides/storage-and-backup/object-storage/s3-private-endpoint.md.

Object Storage - Get started with Private Endpoint (Beta)

View as Markdown

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

Warning

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.

Info

Private Endpoint is only available for S3-compatible Object Storage. Swift-based Object Storage is not supported.

Requirements

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:

IdentifierExampleWhere to find itUsed for
Private Endpoint IDpe-a1b2c3d4In the Console, the ID field of the Private Endpoint details page. In the API, the currentState.endpointId field. It is also the first part of the hostname, before .s3.: pe- followed by 8 hexadecimal characters generated by OVHcloud, for example pe-a1b2c3d4.s3.gra.endpoint.cloud.ovh.netAccess policies (see Step 5)
Resource ID (UUID)5d297126-f4bd-46f9-a4c4-2ffd134121b6The id field of the API responseAPI calls only: this is the {privateEndpointId} in the routes
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:

MethodRouteDescription
GETList the services and connectivity tiers available
GETList the Private Endpoints of a project
POSTCreate a Private Endpoint
GETGet the details of a Private Endpoint
PUTRename a Private Endpoint or change its description
DELETEDelete a Private Endpoint
GETGet the availability of one service
Info

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:

TierBandwidthRecommended for
S500 MbpsWorkloads with moderate throughput (default tier)
M2 GbpsWorkloads with higher throughput
L4 GbpsHeavy data transfers: backups, analytics, machine learning pipelines

The bandwidth values apply to the Beta and may change.

Warning

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.
Via the OVHcloud Console
Via the OVHcloud API

You choose the tier when creating the Private Endpoint (see Step 2), in the Service & size section of the creation form:

  1. In Service, select S3. The list shows the services available in the region of the Private Network you selected.
  2. 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):

Your situationPublic DNS optionWhat you do next
Your instances can use a public DNS resolverOnNothing: OVHcloud publishes and manages the DNS record for you. The record points to a private IP address, which can only be reached from your Private Network.
Your instances cannot use a public DNS resolver, or you do not want the record to be publicOff (default)You manage resolution yourself, for example in a private DNS zone.

The details for each option are given in Step 3.

Via the OVHcloud Console
Via the OVHcloud API
  1. Open Public Cloud and select your project, then open Network > Private Endpoint.
  2. Click Create a Private Endpoint.
  3. In the Private Endpoint name section, enter a name for your Private Endpoint.
  4. 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.
  5. In the Service & size section, select the service S3 and the connectivity tier (see Step 1). During the Beta, only S is available.
  6. In the Public DNS section, turn the switch on or leave it off, according to your choice above.
  7. Optionally, add a Description.
  8. 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.vipAddress in 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.

AWS CLI
boto3 (Python)
s3cmd
aws --endpoint-url https://pe-a1b2c3d4.s3.gra.endpoint.cloud.ovh.net s3 ls
aws --endpoint-url https://pe-a1b2c3d4.s3.gra.endpoint.cloud.ovh.net s3 cp /data/myfile.txt s3://<bucket_name>

To avoid adding --endpoint-url to each command, you can save the endpoint in a profile in ~/.aws/config:

[profile private-endpoint]
region = gra
endpoint_url = https://pe-a1b2c3d4.s3.gra.endpoint.cloud.ovh.net

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:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "DenyUnlessViaPrivateEndpoint",
      "Effect": "Deny",
      "Action": "s3:*",
      "Resource": "*",
      "Condition": {
        "StringNotEquals": {
          "aws:SourceVpce": "pe-<pe_id>"
        }
      }
    }
  ]
}
Warning

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.

Via the OVHcloud Console
Via the AWS CLI
Via the OVHcloud API

The Console does not yet offer a dedicated option for Private Endpoints, but you can edit the user's policy as a JSON file:

  1. In the Object Storage section, open the users tab and download the current policy of your user (Download the policy).
  2. Add the statement above to the downloaded file.
  3. Import the updated file on the same user (Import a policy).

For more details, see our guide on identity and access management.

Warning

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/get
  • publicCloudProject:apiovh:privateEndpoint/create
  • publicCloudProject:apiovh:privateEndpoint/edit
  • publicCloudProject:apiovh:privateEndpoint/delete
  • publicCloudProject: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.

Via the OVHcloud Console
Via the OVHcloud API

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.

Warning

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.

Was this page helpful?