Closed sneiderV closed 4 years ago
Do you have AWS CLI setup with default region? See link below for more details: https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/setup-credentials.html
Hi , I have had the same problem too. Reading in this page about "Explicitly Specifying Credentials", I have tried to do the same in this class: DemoPdfFromLocalPdf.java
Firstly, I have created my "access_key_id" and "secret_key_id" following this.
Then, I have altered the class (DemoPdfFromLocalPdf.java) this way:
BasicAWSCredentials awsCreds = new BasicAWSCredentials("access_key_id", "secret_key_id");
AmazonTextract client = AmazonTextractClientBuilder
.standard()
.withCredentials(new AWSStaticCredentialsProvider(awsCreds))
.withRegion(Regions.US_EAST_1)
.build();
So far, it works for me!
HI, i tried above method but i am getting below error. I just created the access_key_id and secret_key_id com.amazonaws.services.textract.model.AmazonTextractException: The security token included in the request is invalid. (Service: AmazonTextract; Status Code: 400; Error Code: UnrecognizedClientException;
Hi, I'm interested in using textrack and I read the instructions mentioned in the main page of Amazon like those of this repository.
I am using the class: DemoPdfFromLocalPdf.java But I get the following error when run application:
I try to use in this class (DemoPdfFromLocalPdf.java) the method .withRegion to set it:
AmazonTextractClientBuilder client = AmazonTextractClientBuilder.standard().withRegion(Regions.US_EAST_1);
but, show the same error.finally, use the .isServiceSupported method to know in which Region the service was available, use all regions (21 Regions) but always throw me false in the response. Maybe the service is not hosted in any region, to make free use?
System.out.println("isSupported: "+Region.getRegion(Regions.EU_CENTRAL_1).isServiceSupported(AmazonTextract.ENDPOINT_PREFIX));
any idea of this?
Thank you.