Create a Gateway endpoint

  1. Open the VPC console, choose Endpoints → Create endpoint.
  2. Name tag: s3-gwe. Type: AWS services.
  3. In Services, filter by s3 and choose com.amazonaws.<region>.s3 with type Gateway.

select gateway

  1. VPC: choose VPC Cloud.
  2. Route tables: select RT Private Cloud (the table associated with the 2 private subnets – not the main table).
  3. Policy: keep Full access. You will restrict access with an endpoint policy in section 5.

route table

  1. Scroll down and choose Create endpoint.

create

  1. The endpoint s3-gwe is created with status Available.

done

  1. Open Route tables → RT Private Cloud → Routes. A new route has been added automatically: destination is the S3 prefix list (pl-...) and target is the gateway endpoint (vpce-...).

prefix list route

The route table has no 0.0.0.0/0 route, so instances in these subnets cannot reach the Internet. Only S3 traffic (matched by the prefix list) leaves the VPC – privately, through the gateway endpoint.