Launch EMR in a VPC using boto

280 görüntüleme
İlk okunmamış mesaja atla

AMAL G JOSE

okunmadı,
9 Eki 2014 08:21:489.10.2014
alıcı boto-...@googlegroups.com
Hi,

I want to launch an EMR in a custom VPC using boto.
I am able to launch EMR in the default VPC, but I haven't seen any option in boto api for specifying the VPC. 
 Can anyone help me regarding this.?

Regards,
Amal G Jose

AMAL G JOSE

okunmadı,
14 Eki 2014 09:10:0714.10.2014
alıcı boto-...@googlegroups.com
I found the solution.
In the current versions of boto there is no direct option to specify the subnet for launching EMR.
So we can pass the subnet id as an argument to the api_params option in the run_jobflow method of EmrConnection.
Pass Instances.Ec2SubnetId parameter and the value of this parameter as subnet-xxx as a parameter dictionary to the api_params argument in the run_jobflow method.
It worked perfectly for me.


Regards,
Amal G Jose

Vinod Krishnan

okunmadı,
30 Eki 2014 06:20:5230.10.2014
alıcı boto-...@googlegroups.com
Thanks Amal . It worked for me as well

Le Chen

okunmadı,
28 Şub 2015 11:00:0228.02.2015
alıcı boto-...@googlegroups.com
Thanks.
In case some find this post useful, here's the codes.

  api_params = {"Instances.Ec2SubnetId":subnet_id}

  #Launching the cluster
  cluster_id = conn.run_jobflow(
               name,
               ec2_keyname=AWS_EC2_KEY_NAME,
               steps=[],
               keep_alive=False,
               master_instance_type = instance_type,
               slave_instance_type = instance_type,
               num_instances=2,
               ami_version=ami_version,
               api_params=api_params)
Tümünü yanıtla
Yazarı yanıtla
Yönlendir
0 yeni ileti