xenondevs / Nova

Nova is a server-side modding framework for Paper servers that aims to streamline adding custom content like items, blocks, guis, and more, without client-side modifications, using resource pack tricks.
Other
367 stars 38 forks source link

[Request - S3] S3 configuration is missing forcePathStyle #415

Closed Whitebrim closed 1 month ago

Whitebrim commented 1 month ago

Describe your feature request.

Please add https://sdk.amazonaws.com/kotlin/api/latest/s3/aws.sdk.kotlin.services.s3/-s3-client/-config/-builder/force-path-style.html to config

Additional context

  auto_upload:
    enabled: true
    service: amazon_s3
    endpoint: s3.brim.su
    region: us-east-1
    bucket: brimworld-api
    key_id: ***
    key_secret: ******
[20:42:20 ERROR]: [Nova] Failed to upload the resource pack!
software.amazon.awssdk.core.exception.SdkClientException: Received an UnknownHostException when attempting to interact with a service. See cause for the exact endpoint that is failing to resolve. If this is happening on an endpoint that previously worked, there may be a network connectivity issue or your DNS cache could be storing endpoints for too long.

Caused by: software.amazon.awssdk.core.exception.SdkClientException: Unable to execute HTTP request: brimworld-api.s3.brim.su

Caused by: java.net.UnknownHostException: brimworld-api.s3.brim.su
NichtStudioCode commented 1 month ago

I'm not familiar with aws, but why should we use a legacy request style?

tie commented 1 month ago

For deployment of S3-compatible implementations (e.g. minio, garage, seaweedfs) that do not use or support virtual-host-style requests (i.e. subdomains). For example, with path style requests, the request should be made to s3.brim.su (with bucket in the URL path instead of being a subdomain) instead of brimworld-api.s3.brim.su domain. AWS SDKs supports this behavior with force_path_style option. See also https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html

To be clear, this should be a boolean option in the service config since this behavior is legacy only for Amazon-hosted S3 service.

Whitebrim commented 1 month ago

To be clear, this should be a boolean option in the service config

And false by default, I need it to be true, but Amazon S3 users won't change it.

Whitebrim commented 1 month ago

It's working now, thank you ❤️