Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

349
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda