For the two hashes, it would be better to use a data attribute on this select box, e.g.

    { :'data-vpcs' => vpc_sg_hash.to_json }

and then in the JS you can do this to get the object:

    $(form).data('vpcs')

also, "Subnet" and "EC2" can be extracted with `_("..")`.