A couple of long awaited features became available for AWS EC2 instances and Go 1.8 was released.
AWS missing features
There have always been things that annoyed me with EC2 instances. Things that make no sense at all, or were available from competitors but not from AWS. At the top of the list there was the ability to resize EBS volumes.
EBS volumes are basically the hard disks for EC2 instances and as it’s all “in the cloud”, you’d expect that these are fairly flexible. And indeed when you create one you can choose between different types and go crazy with the sizes1. Once they were attached to your instance though you were no longer able to make any changes to it. It was locked in and if you wanted or required a different size while keeping your data your only option was to make a snapshot and create a new disk from that snapshot. In fact, I’ve written on this site about how that exact process2 works for root devices.
Luckily they’ve finally made it possible to do these changes directly. It’s not perfect of course, as there are some limitations and you’ll still need to run resize tools inside your instance but it’s a very welcome change. Right now I don’t believe you can do this yet with CloudFormation managed instances, but I haven’t tried it yet either. Obviously, I would be really happy if support for this was in CloudFormation as I manage all my instances through that.
The other annoying limitation that was finally solved is for IAM instance roles. If you have used EC2 instances often you will have likely run into the issue where you forgot to add an instance role to it. Instance roles are the recommended way of creating permissions for your EC2 instances. Using these you can grant your instance, and the applications running on it, access to all the different parts of your AWS infrastructure without needing keys. This works very well and makes a lot of things easier from a security and management perspective.
However, until recently, if you didn’t add the role to an instance when you first created it you couldn’t add it later. It was always possible to change the role that was attached, but if you forgot about it you were out of luck. This wasn’t a major issue if you discovered it early enough3, but if it was a production instance that you needed to keep running it could be a lot of work to replace it.
In good news, this too has now been solved, although in a limited way. You can now add or change4 instance roles. As of now this can only be done using the CLI tools. This is a bit surprising to me, but I guess they either didn’t want to confuse people in the console or just didn’t have an interface ready for it yet. Of course, there is another option, that I simply didn’t see where the function is hidden in the Console. I looked for it, but maybe I overlooked it. Again though, my preferred solution would be to have this available in CloudFormation.
Go 1.8
As regular readers know, I like the Go language. So much in fact that I’ve been organizing the meetup for it for almost a year now5. Which is why every six months I write a weekly note containing the regularly scheduled new version. Go 1.8 is not a major improvement. Don’t get me wrong, there are a number of very nice changes in it but most of these changes won’t have a great impact on your work. Unless you’re e exact edge case being targeted.
Personally the two things I like the most about this release are the conversion rule changes, that will now let you move easily convert two structs with the same fields into each other, and the new sort.Slice
function which allows for far more succinct sorting algorithms.
If you’re into Go and want to learn more about the changes, I would recommend you read this presentation by Francesc Campoy. We used this at our last meetup as a guide to explore the various changes and with all the code examples in it this is a good way to learnt about these.
-
There are limits of course, but if you really need more than 16TiB you can switch to a raid setup. ↩︎
-
And will now have to update that page to reflect this new functionality. ↩︎
-
But often still annoying as you had to do it again. ↩︎
-
Add a different role, not change the permissions of the attached role ↩︎
-
Although unfortunately I will have to stop doing so after March due to other commitments. ↩︎