Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

357
Vistas
How do I use S3 VPC endpoint in Java?

What is the way to get an S3 object using the VPC endpoint for S3 in JAVA? Shall I use a simple http-client? Or is there a way to do this using AmazonS3ClientBuilder?

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

You don't do anything differently when using an S3 VPC endpoint after you configure it. Nothing in your code changes.

When a subnet in a VPC is associated with a route table that is configured for a VPC endpoint, only one thing happens:

  • all of the public IP addresses for S3 in your region are routed to the VPC endpoint instead of following the default route.

That's it.

The prefix list pl-xxxxxxxx in your route table represents a list of all the public subnets associated with S3 in your region. The list is automatically maintained by the AWS infrastructure. When an instance sends traffic to S3, it does a DNS lookup to find an IP address for the bucket. When it connects to that IP address, if the route table for the instance's subnet includes an entry for that prefix list using the VPC endpoint for S3, it connects to S3 over the endpoint.

All instances in subnets associated with the specified route tables automatically use the endpoint to access the service; subnets that are not associated with the specified route tables do not use the endpoint to access the service.

http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-endpoints.html#vpc-endpoints-routing

over 4 years ago · Santiago Trujillo Denunciar

0

The AmazonS3ClientBuilder can be used to build a client that can connect to a specific end-point. There is no need to write your own low-level client!

Here's an example:

BasicAWSCredentials myCredentials = new BasicAWSCredentials("access_key", "secret_key");
AWSCredentialsProvider myCredentialsProvider = new StaticAWSCredentialsProvider(myCredentials);
String myEndpoint = ".."; // set your endpoint here
String myRegion = "..";   // set your region (ie. us-east-1, or us-east-1 etc.)

AmazonS3 s3Client = AmazonS3ClientBuilder.standard()
            .withCredentials(myCredentialProvider)
            .withEndpoint(myEndpoint)
            .withRegion(myRegion)
            .build();
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda