lemur icon indicating copy to clipboard operation
lemur copied to clipboard

Region

Open prepor opened this issue 11 years ago • 2 comments

Hello.

How to set region for EMR cluster?

prepor avatar Mar 04 '14 05:03 prepor

For now i just monkeypatch lemur:

(defn emr-client [aws-creds]
  (doto (AmazonElasticMapReduceClient. aws-creds)
    (.setEndpoint "elasticmapreduce.eu-west-1.amazonaws.com")))

Is there better way? )

prepor avatar Mar 04 '14 05:03 prepor

You can avoid the monkeypatch, using this trick in your jobdef:

(require '[com.climate.services.aws.emr :as emr] '[com.climate.services.aws.common :as aws])

(import com.amazonaws.services.elasticmapreduce.AmazonElasticMapReduceClient)

(defn eu-west-1-emr-client [aws-creds](doto %28AmazonElasticMapReduceClient. aws-creds%29 %28.setEndpoint)))

...

(with-bindings {#'emr/emr (aws/aws eu-west-1-emr-client (aws/aws-credential-discovery))} (fire! test-cluster-fn test-step-fn))

See this discussion with more detail: https://groups.google.com/forum/#!topic/lemur-user/eHyQrB6qMXM. Ideally this would be easier, maybe a :region key in defcluster. A pull-request would be happily accepted.

marc

On Tue, Mar 4, 2014 at 12:23 AM, Andrew Rudenko [email protected]:

For now i just monkeypatch lemur:

(defn emr-client [aws-creds](doto %28AmazonElasticMapReduceClient. aws-creds%29 %28.setEndpoint)))

Is there better way? )

Reply to this email directly or view it on GitHubhttps://github.com/TheClimateCorporation/lemur/issues/24#issuecomment-36593246 .

mlimotte avatar Mar 04 '14 12:03 mlimotte