title: How to set up Amazon DynamoDB Client on AWS (JAVA)
body: <p>Trying to set up a client for my  Amazon DynamoDB in Java 8 and am running into this error when I try to run my lambda function locally. I am trying to connect to  Amazon DynamoDB and I already have set up in AWS Management Console.</p>
  <blockquote>
  <p>Error trying to commit audit record:com.amazonaws.services.dynamodbv2.model.AmazonDynamoDBException: The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details. (Service: AmazonDynamoDBv2; Status Code: 400; Error Code: InvalidSignatureException;</p>
  </blockquote>
  <p>I am still new to AWS and trying to understand how it works. I am sure the credentials I provided matched the ones I have.</p>
  <pre><code>AmazonDynamoDB client = AmazonDynamoDBClient.builder()
              .withRegion(&quot;us-east-2&quot;)
              .withCredentials(new AWSStaticCredentialsProvider(new 
               BasicAWSCredentials(&quot;key&quot;,&quot;private key&quot;)))
              .build();
  DynamoDB dynamoDB = new DynamoDB(client);
  Table table = dynamoDB.getTable(&quot;tableName&quot;)
  </code></pre>