amazon-archives / kinesis-storm-spout

Kinesis spout for Storm
Other
106 stars 64 forks source link

Unable to load AWS credentials from any provider in the chain #14

Closed mrdlmndr closed 9 years ago

mrdlmndr commented 9 years ago

Hello Awslabs team,

I have configure the ~/.aws/credentials files with my AWS credentials. Still I'm getting following exception:

9503 [Thread-21-kinesis-entry] ERROR backtype.storm.util - Async loop died! com.amazonaws.AmazonClientException: Unable to load AWS credentials from any provider in the chain at com.amazonaws.auth.AWSCredentialsProviderChain.getCredentials(AWSCredentialsProviderChain.java:117) ~[kinesis-storm-clickstream-sample-app-1.0.0-jar-with-dependencies.jar:na] at com.amazonaws.services.kinesis.AmazonKinesisClient.invoke(AmazonKinesisClient.java:2460) ~[kinesis-storm-clickstream-sample-app-1.0.0-jar-with-dependencies.jar:na] at com.amazonaws.services.kinesis.AmazonKinesisClient.describeStream(AmazonKinesisClient.java:860) ~[kinesis-storm-clickstream-sample-app-1.0.0-jar-with-dependencies.jar:na] at com.amazonaws.services.kinesis.stormspout.KinesisHelper.getShardList(KinesisHelper.java:85) ~[kinesis-storm-clickstream-sample-app-1.0.0-jar-with-dependencies.jar:na] at com.amazonaws.services.kinesis.stormspout.state.zookeeper.ZookeeperStateManager.activate(ZookeeperStateManager.java:109) ~[kinesis-storm-clickstream-sample-app-1.0.0-jar-with-dependencies.jar:na] at com.amazonaws.services.kinesis.stormspout.KinesisSpout.activate(KinesisSpout.java:125) ~[kinesis-storm-clickstream-sample-app-1.0.0-jar-with-dependencies.jar:na] at backtype.storm.daemon.executor$fn4654$fn4669$fn__4698.invoke(executor.clj:563) ~[storm-core-0.9.4.jar:0.9.4] at backtype.storm.util$async_loop$fn__458.invoke(util.clj:463) ~[storm-core-0.9.4.jar:0.9.4] at clojure.lang.AFn.run(AFn.java:24) [clojure-1.5.1.jar:na] at java.lang.Thread.run(Thread.java:745) [na:1.7.0_75]

I have tried with manually export my credentials. But then, it only work for LocalMode Storm Topology, not for RemoteMode Topology.

Thanks.

npetryk commented 9 years ago

The credentials are not accessed until the spout is opened -- they aren't fetched on your local machine and then transmitted to the remote host. When running w/ a RemoteMode topology, this means that you will have to have setup ~/.aws/credentials on the remote hosts that can possibly run the spout so they can be fetched.

The way the Sample gets around this is with the CustomCredentialsProviderChain that looks for a properties file in the classpath with the credentials. I assume this gets packaged with the uber-jar which does get sent to the remote hosts so it can be loaded there.