

# Working with Amazon S3 on Outposts endpoints
Working with endpoints

To route requests to an Amazon S3 on Outposts access point, you must create and configure an S3 on Outposts endpoint. In order to create an endpoint, you will need an active connection with your service link to your Outposts home region. Each virtual private cloud (VPC) on your Outpost can have one associated endpoint. For more information about endpoint quotas, see [S3 on Outposts network requirements](S3OnOutpostsRestrictionsLimitations.md#S3OnOutpostsConnectivityRestrictions). You must create an endpoint to be able to access your Outposts buckets and perform object operations. For more information, see [Endpoints](S3OutpostsWorkingBuckets.md#S3OutpostsEP).

After you create an endpoint, you can use the ‘Status’ field, to understand the state of the endpoint. If your Outposts is offline, it will return a CREATE\$1FAILED. You can check your service link connection, delete the endpoint, and retry the create operation after your connection has resumed. For a list of additional error codes, see below. For more information, see [Endpoints](S3OutpostsWorkingBuckets.md#S3OutpostsEP).


| API | Status | Failed Reason Error Code | Message - Failed Reason | 
| --- | --- | --- | --- | 
| CreateEndpoint | Create\$1Failed | OutpostNotReachable | Endpoint could not be created as the service link connection to your Outposts home Region is down. Check your connection, delete the endpoint, and try again. | 
| CreateEndpoint | Create\$1Failed | InternalError | Endpoint could not be created due to Internal Error. Please delete the endpoint and create again. | 
| DeleteEndpoint | Delete\$1Failed | OutpostNotReachable | Endpoint could not be deleted as the service link connection to your Outposts home Region is down. Check your connection and please try again. | 
| DeleteEndpoint | Delete\$1Failed | InternalError | Endpoint could not be deleted due to Internal Error. Please try again. | 

For more information about working with buckets on S3 on Outposts, see [Working with S3 on Outposts buckets](S3OutpostsWorkingBuckets.md).

The following sections describe how to create and manage endpoints for S3 on Outposts.

**Topics**
+ [

# Creating an endpoint on an Outpost
](S3OutpostsCreateEndpoint.md)
+ [

# Viewing a list of your Amazon S3 on Outposts endpoints
](S3OutpostsListEndpoints.md)
+ [

# Deleting an Amazon S3 on Outposts endpoint
](S3OutpostsDeleteEndpoints.md)

# Creating an endpoint on an Outpost
Creating an endpoint

To route requests to an Amazon S3 on Outposts access point, you must create and configure an S3 on Outposts endpoint. In order to create an endpoint, you will need an active connection with your service link to your Outposts home region. Each virtual private cloud (VPC) on your Outpost can have one associated endpoint. For more information about endpoint quotas, see [S3 on Outposts network requirements](S3OnOutpostsRestrictionsLimitations.md#S3OnOutpostsConnectivityRestrictions). You must create an endpoint to be able to access your Outposts buckets and perform object operations. For more information, see [Endpoints](S3OutpostsWorkingBuckets.md#S3OutpostsEP).

**Permissions**  
For more information about the permissions that are required to create an endpoint, see [Permissions for S3 on Outposts endpoints](S3OutpostsIAM.md#S3OutpostsEndpointPermissions).

When you create an endpoint, S3 on Outposts also creates a service-linked role in your AWS account. For more information, see [Using service-linked roles for Amazon S3 on Outposts](S3OutpostsServiceLinkedRoles.md).

The following examples show you how to create an S3 on Outposts endpoint by using the AWS Management Console, AWS Command Line Interface (AWS CLI), and AWS SDK for Java. 

## Using the S3 console


1. Sign in to the AWS Management Console and open the Amazon S3 console at [https://console.aws.amazon.com/s3/](https://console.aws.amazon.com/s3/).

1. In the left navigation pane, choose **Outposts access points**.

1. Choose the **Outposts endpoints** tab.

1. Choose **Create Outposts endpoint**.

1. Under **Outpost**, choose the Outpost to create this endpoint on.

1. Under **VPC**, choose a VPC that does not yet have an endpoint and that also complies with the rules for Outposts endpoints.

   A virtual private cloud (VPC) enables you to launch AWS resources into a virtual network that you define. This virtual network closely resembles a traditional network that you would operate in your own data center, with the benefits of using the scalable infrastructure of AWS. 

   If you don’t have a VPC, choose **Create VPC**. For more information, see [Creating access points restricted to a virtual private cloud (VPC)](https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points-vpc.html) in the *Amazon S3 User Guide*.

1. Choose **Create Outposts endpoint**.

## Using the AWS CLI


**Example**  
The following AWS CLI example creates an endpoint for an Outpost by using the VPC resource access type. The VPC is derived from the subnet. To run this command, replace the `user input placeholders` with your own information.  

```
aws s3outposts create-endpoint --outpost-id op-01ac5d28a6a232904 --subnet-id subnet-8c7a57c5 --security-group-id sg-ab19e0d1
```
The following AWS CLI example creates an endpoint for an Outpost by using the customer-owned IP address pool (CoIP pool) access type. To run this command, replace the `user input placeholders` with your own information.  

```
aws s3outposts create-endpoint --outpost-id op-01ac5d28a6a232904 --subnet-id subnet-8c7a57c5 --security-group-id sg-ab19e0d1 --access-type CustomerOwnedIp --customer-owned-ipv4-pool ipv4pool-coip-12345678901234567
```

## Using the AWS SDK for Java


**Example**  
For examples of how to create an endpoint for an S3 Outpost with the AWS SDK for Java, see [CreateOutpostsEndPoint.java](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javav2/example_code/s3/src/main/java/com/example/s3/outposts/CreateOutpostsEndPoint.java) in the *AWS SDK for Java 2.x Code Examples*.

# Viewing a list of your Amazon S3 on Outposts endpoints
Listing endpoints

To route requests to an Amazon S3 on Outposts access point, you must create and configure an S3 on Outposts endpoint. In order to create an endpoint, you will need an active connection with your service link to your Outposts home region. Each virtual private cloud (VPC) on your Outpost can have one associated endpoint. For more information about endpoint quotas, see [S3 on Outposts network requirements](S3OnOutpostsRestrictionsLimitations.md#S3OnOutpostsConnectivityRestrictions). You must create an endpoint to be able to access your Outposts buckets and perform object operations. For more information, see [Endpoints](S3OutpostsWorkingBuckets.md#S3OutpostsEP).

The following examples show you how to return a list of your S3 on Outposts endpoints by using the AWS Management Console, AWS Command Line Interface (AWS CLI), and AWS SDK for Java.

## Using the S3 console


1. Open the Amazon S3 console at [https://console.aws.amazon.com/s3/](https://console.aws.amazon.com/s3/).

1. In the left navigation pane, choose **Outposts access points**.

1. On the **Outposts access points** page, choose the **Outposts endpoints** tab.

1. Under **Outposts endpoints**, you can view a list of your S3 on Outposts endpoints.

## Using the AWS CLI


The following AWS CLI example lists the endpoints for the AWS Outposts resources that are associated with your account. For more information about this command, see [list-endpoints](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3outposts/list-endpoints.html) in the *AWS CLI Reference*.

```
aws s3outposts list-endpoints
```

## Using the AWS SDK for Java


The following SDK for Java example lists the endpoints for an Outpost. For more information, see [ListEndpoints](https://docs.aws.amazon.com/AmazonS3/latest/API/API_s3outposts_ListEndpoints.html) in the *Amazon Simple Storage Service API Reference*.

```
import com.amazonaws.services.s3outposts.AmazonS3Outposts;
import com.amazonaws.services.s3outposts.AmazonS3OutpostsClientBuilder;
import com.amazonaws.services.s3outposts.model.ListEndpointsRequest;
import com.amazonaws.services.s3outposts.model.ListEndpointsResult;

public void listEndpoints() {
    AmazonS3Outposts s3OutpostsClient = AmazonS3OutpostsClientBuilder
                .standard().build();
                
    ListEndpointsRequest listEndpointsRequest = new ListEndpointsRequest();
    ListEndpointsResult listEndpointsResult = s3OutpostsClient.listEndpoints(listEndpointsRequest);
    System.out.println("List endpoints result is " + listEndpointsResult);
}
```

# Deleting an Amazon S3 on Outposts endpoint
Deleting an endpoint

To route requests to an Amazon S3 on Outposts access point, you must create and configure an S3 on Outposts endpoint. In order to create an endpoint, you will need an active connection with your service link to your Outposts home region. Each virtual private cloud (VPC) on your Outpost can have one associated endpoint. For more information about endpoint quotas, see [S3 on Outposts network requirements](S3OnOutpostsRestrictionsLimitations.md#S3OnOutpostsConnectivityRestrictions). You must create an endpoint to be able to access your Outposts buckets and perform object operations. For more information, see [Endpoints](S3OutpostsWorkingBuckets.md#S3OutpostsEP).

The following examples show you how to delete your S3 on Outposts endpoints by using the AWS Management Console, AWS Command Line Interface (AWS CLI), and AWS SDK for Java.

## Using the S3 console


1. Open the Amazon S3 console at [https://console.aws.amazon.com/s3/](https://console.aws.amazon.com/s3/).

1. In the left navigation pane, choose **Outposts access points**.

1. On the **Outposts access points** page, choose the **Outposts endpoints** tab.

1. Under **Outposts endpoints**, choose the endpoint that you want to delete, and choose **Delete**.

## Using the AWS CLI


The following AWS CLI example deletes an endpoint for an Outpost. To run this command, replace the `user input placeholders` with your own information.

```
aws s3outposts delete-endpoint --endpoint-id example-endpoint-id --outpost-id op-01ac5d28a6a232904
```

## Using the AWS SDK for Java


The following SDK for Java example deletes an endpoint for an Outpost. To use this example, replace the `user input placeholders` with your own information.

```
import com.amazonaws.arn.Arn;
import com.amazonaws.services.s3outposts.AmazonS3Outposts;
import com.amazonaws.services.s3outposts.AmazonS3OutpostsClientBuilder;
import com.amazonaws.services.s3outposts.model.DeleteEndpointRequest;

public void deleteEndpoint(String endpointArnInput) {
    String outpostId = "op-01ac5d28a6a232904";
    AmazonS3Outposts s3OutpostsClient = AmazonS3OutpostsClientBuilder
                .standard().build();
                
    Arn endpointArn = Arn.fromString(endpointArnInput);
    String[] resourceParts = endpointArn.getResource().getResource().split("/");
    String endpointId = resourceParts[resourceParts.length - 1];
    DeleteEndpointRequest deleteEndpointRequest = new DeleteEndpointRequest()
                .withEndpointId(endpointId)
                .withOutpostId(outpostId);
    s3OutpostsClient.deleteEndpoint(deleteEndpointRequest);
    System.out.println("Endpoint with id " + endpointId + " is deleted.");
}
```