I am trying to use wasabi cloud storage using aws s3 sdk but I am getting The URI scheme of endpointOverride must not be null exception. Here is my code. How can I solve the issue?
private val AMAZON_S3_CLIENT: S3Client = S3Client.builder()
.endpointOverride(URI(Config.SERVICE_END_POINT))
.region(Region.US_EAST_1)
.credentialsProvider(
StaticCredentialsProvider.create(
AwsBasicCredentials.create(
Config.AWS_ACCESS_KEY,
Config.AWS_SECRET_KEY
)
)
)
.build()
I just encountered the same exception, using AWS Java SDK 2 with DynamoDB.
java.lang.NullPointerException: The URI scheme of endpointOverride must not be null
As the exception says the scheme in the URI of endpointOverride is missing.
I previously used "dynamodb.eu-central-1.amazonaws.com".
Adding the scheme solved the problem.
"https://dynamodb.eu-central-1.amazonaws.com"
That is correct. you must prepend the endpoint with https://
We are using a Flink Kinesis Analytics app to read from a KDS and write to a Timestream instance.
In Flink when creating the required TimestreamSink object in Java to write to Timestream there is a property that needs bet set when using a VPC endpoint service.
TimestreamSinkConfig.builder().endpointOverride(endpointOverride)
initially I had endpointOverride as null when not using the VPC endpoint and that worked fine.
When we implemented the VPC endpoint with the endpoint
ingest-cell1.timestream.region.amazonaws.com
it did not work and it wasn't initially obvious why as the documentation didn't state that explicitly.
When I used https://ingest-cell1.timestream.region.amazonaws.com (where region is our AWS region and cell1 is the Timestream cell) the Flink process was able to write to Timestream as expected.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With