EC2 create instance with non-default root volume size

In the AWS console, I can create an EC2 instance and change the size of the root volume from its default size; we frequently create instances with single volumes of (say) 100GB for our users.

The ‘ec2’ module doesn’t have a parameter to define the EBS root volume size. Is this something that’s do-able? I’m not seeing an obvious way to do this in the boto docs.

Are there other ways to accomplish this: spin up an instance with a single volume of non-default size?

Thanks.

Doh, I see this pull request does exactly as I need, but looks like it was closed due to being Ubuntu-specific.
https://github.com/ansible/ansible/pull/4404

If you’d like to start that and go from there, that would be welcome!

I can take a whack at that but want to make sure that I’m pursuing a correct solution that will be accepted.

@electroniceagle has a fix that will let you specify the volume device name so it can accommodate non-Ubuntu-shaped OSes, and I think that’s a decent approach.

https://github.com/ansible/ansible/pull/4404#issuecomment-29752476

If it’s not, can you suggest a preferred way that’s more natural and less failure-prone?

Thanks.

Have a look at
https://github.com/ansible/ansible/pull/4534

It should do what you want (change the volume size of the root volume)

If it doesn’t, let me know in what way it fails and I’ll get it fixed.

Will