title: Kinesis worker error: Caught exception when initializing LeaseCoordinator
body: <p>I am trying to execute the sample producer and consumer code on the Kinesis Streams website: <a href="http://docs.aws.amazon.com/streams/latest/dev/learning-kinesis-module-one-download.html" rel="nofollow noreferrer">http://docs.aws.amazon.com/streams/latest/dev/learning-kinesis-module-one-download.html</a></p>
  
  <p>I've downloaded the source, and I am using Eclipse to run it. I've included the necessary jar files, so I would think that everything would be setup to run.</p>
  
  <p>When I run the processor code that consumes the records from Kinesis, however, I get this error:</p>
  
  <pre><code>Aug 02, 2016 8:35:14 PM com.amazonaws.services.kinesis.clientlibrary.lib.worker.Worker initialize SEVERE: Caught exception when initializing LeaseCoordinator
  </code></pre>
  
  <p>Does anyone think they could tell me what is causing this error?</p>
  
  <p>EDIT: Here is the full stack trace from the error on Eclipse:</p>
  
  <pre><code>Aug 02, 2016 9:02:27 PM com.amazonaws.services.kinesis.clientlibrary.lib.worker.Worker initialize
  SEVERE: Caught exception when initializing LeaseCoordinator
  com.amazonaws.services.kinesis.leases.exceptions.DependencyException: com.amazonaws.services.dynamodbv2.model.AmazonDynamoDBException: User: arn:aws:sts::500238854089:assumed-role/NORD-NONPROD-a0121-Team/AEXM is not authorized to perform: dynamodb:CreateTable on resource: arn:aws:dynamodb:us-west-2:500238854089:table/amazon-kinesis-learning (Service: AmazonDynamoDBv2; Status Code: 400; Error Code: AccessDeniedException; Request ID: BGME094FRUAEK2KFCPQIAM5U8VVV4KQNSO5AEMVJF66Q9ASUAAJG)
  at com.amazonaws.services.kinesis.leases.impl.LeaseManager.createLeaseTableIfNotExists(LeaseManager.java:124)
  at com.amazonaws.services.kinesis.clientlibrary.lib.worker.KinesisClientLibLeaseCoordinator.initialize(KinesisClientLibLeaseCoordinator.java:172)
  at com.amazonaws.services.kinesis.clientlibrary.lib.worker.Worker.initialize(Worker.java:380)
  at com.amazonaws.services.kinesis.clientlibrary.lib.worker.Worker.run(Worker.java:324)
  at com.amazonaws.services.kinesis.samples.stocktrades.processor.StockTradesProcessor.main(StockTradesProcessor.java:96)
  Caused by: com.amazonaws.services.dynamodbv2.model.AmazonDynamoDBException: User: arn:aws:sts::500238854089:assumed-role/NORD-NONPROD-a0121-Team/AEXM is not authorized to perform: dynamodb:CreateTable on resource: arn:aws:dynamodb:us-west-2:500238854089:table/amazon-kinesis-learning (Service: AmazonDynamoDBv2; Status Code: 400; Error Code: AccessDeniedException; Request ID: BGME094FRUAEK2KFCPQIAM5U8VVV4KQNSO5AEMVJF66Q9ASUAAJG)
  at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:1401)
  at com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:945)
  at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:723)
  at com.amazonaws.http.AmazonHttpClient.doExecute(AmazonHttpClient.java:475)
  at com.amazonaws.http.AmazonHttpClient.executeWithTimer(AmazonHttpClient.java:437)
  at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:386)
  at com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient.doInvoke(AmazonDynamoDBClient.java:2074)
  at com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient.invoke(AmazonDynamoDBClient.java:2044)
  at com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient.createTable(AmazonDynamoDBClient.java:899)
  at com.amazonaws.services.kinesis.leases.impl.LeaseManager.createLeaseTableIfNotExists(LeaseManager.java:117)
  ... 4 more
  </code></pre>