How to add disks (ebs) to AWS EC2 instance on euwe2

Hello,

I am using euwe2 and need to add x amount of disks to an ec2 instance. With the vmware provider I could use add_disk, but that doesn’t seem to translate to the AWS provider. Has anyone crossed this bridge before?

Thanks

We have develop a custom add_disk function for aws instance that use aws sdk.

Hey @LorkScorguar thanks for the reply. We did the same, after looking at doing it via Ansible which didn’t pan out.

do you all have this custom add disk function up somewhere to share?

Have uploaded to git

Dan, did you ever try to set the initial root disk when doing initial provisioning of an AWS instance?

Nope sorry, using ami with root disk.

This should work…
Stop the instance.
Detach the root EBS volume.
Attach the alternate EBS volume as the root: /dev/sda1
Start the instance