List all your AWS resources with Go

Picking up on Diogo’s last post on how to obliterate all resources on your AWS Account, I thought it could also be useful to, instead, list all you have running.

Since I’m long overdue on a Go post, I’m going to share a one file app that uses the Go AWS SDK for to crawl each region for all taggable resources and pretty printing it on stdout, organised by Service type (e.g. EC2, ECS, ELB, etc.), Product Type (e.g. Instance, NAT, subnet, cluster, etc.).

The AWS SDK allows to retrieve all ARNs for taggable resources, so that’s all the info I’ll use for our little app.

Note: If you prefer jumping to full code code, please scroll until the end and read the running instructions before.

The objective

The main goal is to get structured information from the ARNs retrieved, so the first thing is to create a type that serves as a blue print for what I’m trying to achieve. Because I want to keep it simple, let’s call this type SingleResource.

Also, since we are taking care of the basics, we can also define the TraceableRegions that we want the app to crawl through.

Finally, to focus the objective, let’s also create a function that accepts a slice of []*SingleResource and will convert will print it out as a table to stdout:

// TraceableRegions is a list of AWS regions we want to crawl
var TraceableRegions = []string{"us-east-1", "us-east-2", "us-west-1", "us-west-2", "ca-central-1", "eu-central-1", "eu-west-1", "eu-west-2", "eu-west-3", "eu-north-1", "ap-northeast-1", "ap-northeast-2", "ap-northeast-3", "ap-southeast-1", "ap-southeast-2", "ap-south-1", "sa-east-1"}
// SingleResource defines how we want to describe each AWS resource
type SingleResource struct {
Region *string
Service *string
Product *string
Details *string
ID *string
ARN *string
// PrettyPrintResources makes use of a nice golang library to show
// tables on stdout. Check it out:
func PrettyPrintResources(resources []*SingleResource) {
var data [][]string
for _, r := range resources {
row := []string{
data = append(data, row)
table := tablewriter.NewWriter(os.Stdout)
table.SetHeader([]string{"Region", "Service", "Product", "ID"})
table.SetBorder(true) // Set Border to false

Continue reading “List all your AWS resources with Go”

Summary Terraform vs Spinakker

I recently needed to build this summary, so thought I’d rather share with more people as well. Please feel free to add any points you see fitting.


Rather then putting on versus another assuming mutual exclusivity, many companies are adopting both tools simultaneously.Terraform is usually used for static cloud Infrastructure setup and updates, such as networks/VLANs, Firewalls, Load Balancers, storage buckets, etc. Spinakker is used for setting up more complex deployment pipelines, mainly orchestration of software packages and application code to setup on servers.Though there is intersection (Spinakker can also deploy App environment), Terraform provides an easy and clean way to setup Infrastructure-as-Code. Continue reading “Summary Terraform vs Spinakker”

EMC acquires ScaleIO

EMC acquired the Storage Startup ScaleIO for $200M-$300M.

ScaleIO is a Palo Alto based Startup that competes with Amazon AWS, more specifically with its Elastic Block Storage (EBS). They use an architecture of grid computing, where each computing node has local disks and ScaleIo Software. The Software creates a Virtual SAN with local disks, thus providing a highly parallel computing storage nodes SAN, while maintaining HA Enterprise requirements.

ScaleIO Software is allegedly a lightweight piece of Software, and runs alongside with other applications, such as DBs and hyper-visors. They work with all leading Linux distributions and hyper-visors, and offer additional features such as encryption at rest and quality of service (QoS) for performance.

Here’s ScaleIO own competitive smack down:

ScaleIO vs Amazon

AWS: Steps to get a free VM up & running

This post is intended to be a very simplistic post on how to get you started with Amazon Cloud (AWS) with a VM. It will allow you to start experimenting AWS, without any costs (if you take the right steps). Naturally Amazon itself provides more detailed steps here.

What you will need:

  • email account
  • cellphone – for security reasons, to make sure you’re not hosting CPU power for any DDoS and other type of stuff
  • credit card – though you actually need to input credit card details, you can indeed run a free VM in a limit amount of time. Amazon will simply not charge you anything for it, as long as you stick to the greenzone.

Overview of the process:

  1. Sign up for AWS account.
  2. Launch a “t1.micro instance”
  3. Beware of the 750 hours free-use limit.

Simple, right? Here are more detailed steps:

  1. Go to and click on “Sign up”.
  2. Next enter your email address and select “I am a new user.”
  3. Enter Login credentials
  4. Enter your contact information
  5. Enter your payment information
  6. Next you will have an Identity verification through cellphone, which consists of being contacted by an automated system that prompts you to enter the PIN number they provided you.
  7. After that, it may take while until your account is actually activated.
  8. Next go to and click on the “My account Console”, and “AWS Management Console”. After you successfully login, you’ll land at this page:AWS portfolio_II
  9. Click on “EC2  Virtual Servers in the Cloud”.
  10. You will land on the EC2 Dashboard. Right in the middle click on “Launch Instance”.
  11. On the “Create a New Instance” menu select “Quick Launch Wizard”
  12. Then Select “Create new”, enter the name of your new Instance (i.e. VM) and select for instance an Ubuntu, to make sure you stay on the free-way. Nowadays you have two versions of Ubuntu Server available: 12.04.2 LTS and 13.04. If you are following specific tutorials with the previous version of ubuntu, then you might prefer to choose that one. Before hitting continue, make sure you click on the “Download” button. You will download a “pem” file (Privacy Enhance Mail), which is the certificate you will need to sucessfully establish a console session to that VM you’re about to launch. After downloading that file, hit “Continue”.
  13. On the next screen you will be able to confirm that the type of instance you are launching is a “t1.micro”. It is very important you do not change this, if you want to stick with the free experimenting. Hit launch.
  14. Your VM might take a few minutes until the orchestration on Amazon backend is completed. When the initialization is completed, right-click on your instance and select connect.
  15. Select “Connect with a standalone SSH Client”. You will have instructions provided by Amazon there. Make sure you copy the command line provided by Amazon, and launch a terminal session. In Windows I suggest you use Putty. If you’re using a Mac, just go to “Applications > Utilities > Terminal”.
  16. On Mac: Now this part might be a little more tricky if you’re not used to CLI. You need to change the permissions of that “pem” file you downloaded, so change to the directory where you stored the pem file (Usually “Downloads” directory), and change permissions. Enter the following lines, where the text contained in each quotes is a different line: “cd ~/Downloads” , “chmod 400 name-of-the-pem-file-you-downloaded.pem“.
  17. Still on Mac: Now is the time to paste the line you copied from Amazon. Something like “ssh -i name-of-the-pem-file-you-downloaded.pem”
  18. On windows: follow this tutorial to connect with Putty.
  19. There! You should have a Welcome page in your terminal console from Ubuntu.

Up and running. It is very important for you to note that you keep your total usage of t1.micro instances under 750 hours per month to avoid charges from Amazon. In order to do that, you have to terminate (yes delete everything!) your instance. You might not be using CPU power, but you will still be using Storage, which is also included in Amazon’s business…

Now its time for experimenting things. Why not start with a LAMP?