View info about AWS AMIs in Go
Aug 22, 2017 · 1 min read

This is a very short example showing how to interact with the AWS API via the AWS SDK for Go to find out details for a given AMI(Amazon Machine Image).
All of the code is on GitHub.
The first step is to get an AWS API Session, I have defined a helper function for my other projects to allow me to write less code while changing between regions. This function is not needed but it can reduce the clutter in main().
Once you have a session struct you can setup your API client as follows
The result variable contains details about that AMI that you can use later.
The full code can be seen here
