0

I'm running my own S3 AWS Bucket Service on a custom server. I've added all my environmental variables in my Intellij run configurations. Here's my setup in my application.yml for the local environment. However when I try to use the plugin aws-java-sdk-s3 for example to delete a file from the bucket it still points to s3.Germany.amazonaws.com instead of my internal AWS service.

Here's my application.yml

spring:

  datasource:
    url: ${DATABASE_ADDRESS}
    username: ${DATABASE_USERNAME}
    password: ${DATABASE_PASSWORD}

  cloud:
    aws:
      s3:
        bucket-name: ${AWS_S3_BUCKET_NAME}
        credentials:
          access-key: ${AWS_S3_ACCESS_KEY}
          secret-key: ${AWS_S3_SECRET_KEY}
        hostname: ${AWS_S3_HOSTNAME}
        region:
          static: eu-central-1
          auto: false

  http:
    log-request-details: on

What is the correct syntax for hostname and what other aws errors if any am I making in my application.yml?

ThomasAFink
  • 1,257
  • 14
  • 25
  • Hi! Can you please provide the spring version that you are using for setting up an java S3 client – HereAndBeyond May 03 '23 at 15:33
  • I'm using SpringBoot 2.7.5 – ThomasAFink May 03 '23 at 16:05
  • 1
    I think you can take a look at this question: https://stackoverflow.com/questions/51235554/spring-cloud-aws-set-endpoint Looks a bit similar to yours. Based on the spring version that you are using, property `cloud.aws.s3.endpoint` may help you – HereAndBeyond May 03 '23 at 16:14

0 Answers0