Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Region #24

Open
prepor opened this issue Mar 4, 2014 · 2 comments
Open

Region #24

prepor opened this issue Mar 4, 2014 · 2 comments

Comments

@prepor
Copy link
Contributor

prepor commented Mar 4, 2014

Hello.

How to set region for EMR cluster?

@prepor
Copy link
Contributor Author

prepor commented Mar 4, 2014

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? )

@mlimotte
Copy link
Contributor

mlimotte commented Mar 4, 2014

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//issues/24#issuecomment-36593246
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants