Looking at auth.go, the three methods of retrieving the access keys to make API calls to AWS are available:
- the consumer provides the access keys
- get the access keys from environment variables
- get the access keys from the local metadata server
The problem with this is that, as a consumer, I need to add logic to handle falling back to one of the above methods if a previous one fails (provided by consumer -> checked env -> check metadata server). Comparing this code to goamz's GetAuth method, goamz provides a nice wrapper method to encapsulate this fallback logic so that the code will seamlessly work in all three scenarios.
It would be nice to have a method like this for go-kinesis.