# How to edit boto for ec2, if we want to use big size of root

**URL:** <https://forum.ansible.com/t/how-to-edit-boto-for-ec2-if-we-want-to-use-big-size-of-root/16378>\
**Category:** Ansible Project\
**Created:** [September 30, 2014, 7:26am UTC](https://forum.ansible.com/t/how-to-edit-boto-for-ec2-if-we-want-to-use-big-size-of-root/16378 "2014-09-30T07:26:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wholanda\_Edwart](https://avatars.discourse-cdn.com/v4/letter/w/a6a055/32.png) [@wholanda\_Edwart](https://forum.ansible.com/u/wholanda_Edwart)\
**Post date:** [September 30, 2014, 7:26am UTC](https://forum.ansible.com/t/how-to-edit-boto-for-ec2-if-we-want-to-use-big-size-of-root/16378/1 "2014-09-30T07:26:35Z")

</div>

Guys,  
I can use boto to create instance, but my problem, i dont know how to add tag when use it & get ip address.  
If i use ansible, i can give tag name & get ip address of new instance, but the problem the default of root size is 8GB.  
How can i add my python file to create instance in ansible/ edit ec2 in ansible?  
Thx.

PS: this my python file to create instance:

#!/usr/bin/python  
import boto.ec2  
conn = boto.ec2.connect\_to\_region(“ap-southeast-1”,  
aws\_access\_key\_id=‘youraccesskey’,  
aws\_secret\_access\_key=‘yoursecretaccesskey’)  
dev\_sda1 = boto.ec2.blockdevicemapping.EBSBlockDeviceType()  
dev\_sda1.size = 150 # change root volume to 100GB instead of default 8gb  
bdm = boto.ec2.blockdevicemapping.BlockDeviceMapping()  
bdm[‘/dev/sda1’] = dev\_sda1  
reservation = conn.run\_instances(  
‘ami-085b155a’,  
key\_name=‘yourkeyname’,  
instance\_type=‘m3.large’,  
security\_groups=[‘yoursecgroupname’],  
block\_device\_map = bdm)

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [October 1, 2014, 12:17pm UTC](https://forum.ansible.com/t/how-to-edit-boto-for-ec2-if-we-want-to-use-big-size-of-root/16378/2 "2014-10-01T12:17:10Z")

</div>

Start here for basic info and let us know if you have specific questions:

[http://docs.ansible.com/ec2\_module.html](http://docs.ansible.com/ec2_module.html)

[http://docs.ansible.com/guide\_aws.html](http://docs.ansible.com/guide_aws.html)
