
An experimental, automatically generated set of AWS clients in Go - bowsky
https://github.com/stripe/aws-go
======
bowsky
Really happy to see these projects for automatically generated code for based
on service descriptions. Minimal code to maintain and near instant updates for
service providers. I was thrilled to see Amazonka
([https://github.com/brendanhay/amazonka](https://github.com/brendanhay/amazonka))
a little while back. Great to see this done in Go as well!

------
wallflower
This is from HN contributor codahale, originally mentioned in the Atlas from
Hashicorp thread.

"(Apologies for the self-promotion, but it's at least on-topic.)

I just opened up this repo yesterday: [https://github.com/stripe/aws-
go](https://github.com/stripe/aws-go).

It's really raw, but it uses the JSON API descriptions from botocore to
generate Go clients for all 40 public AWS services."

[https://news.ycombinator.com/item?id=8729740](https://news.ycombinator.com/item?id=8729740)

------
zoul
Excuse my ignorance, but isn't this essentially a tight(er) coupling between
the client and the server, something we have been trying to avoid with REST
and, especially, HATEOAS? What happened to API “discoverability”? As I
understood HATEOAS, the point was that the client just had to know how to work
with particular data types (that's the point of an API, really), but was not
expected to know or construct URLs beforehand, thus loosening the coupling to
the server. Did I get it wrong? Did that path prove to be unrealistic?

~~~
codahale
That was not the path taken by Amazon as they made their nearly 40 different
APIs. Engineers from there could certainly speak to the circumstances behind
their choices.

As for aws-go, I had some APIs I needed to use and a machine-readable
description of those APIs. The choice was pretty clear.

------
kevinconroy
Feel like I'm in college and missed a class lecture - what's the standard for
JSON API descriptions and where can I learn more so that I can upgrade my APIs
to have a usable JSON description?

~~~
andrewstuart
Swagger

~~~
Maxious
"Swagger is a simple yet powerful representation of your RESTful API."
[http://swagger.io/](http://swagger.io/)

~~~
wye
What an awful name for such a useful project.

------
misframer
This reminds me of the Google APIs client libraries for Go. They're also
automatically generated from JSON.

[https://github.com/google/google-api-go-
client](https://github.com/google/google-api-go-client)

~~~
tjohns
All of the Google API client libraries are automatically generated. There's a
discovery document that's published for each API to allow for this:
[https://developers.google.com/discovery/](https://developers.google.com/discovery/)

------
theatrus2
We have come full circle: implementing WSDL code generation with JSON
definitions.

------
symfrog
Amazonica
([https://github.com/mcohen01/amazonica](https://github.com/mcohen01/amazonica))
for Clojure automatically generates a client based on the AWS Java API

------
netvarun
There is a similar Perl implementation that we use at my company (Semantics3),
which uses auto generated code from the botocore -
[https://github.com/pplu/aws-sdk-perl](https://github.com/pplu/aws-sdk-perl)

------
andrewstuart
It's a strange thing that Amazon doesn't have an officially written and
supported golang SDK.

Especially since they have bet so heavily on Docker which is built with
golang.

I wonder if Amazon don't support golang directly because it's the Google
language.

~~~
gtaylor
To be fair, it took them ages to start getting serious about Python. It's
still not what I'd call a first-class citizen, in that boto (even with paid
AWS employees on it) lacks support for things like their ElastiCache discovery
protocol (last I checked earlier in the year).

Source: I heavily contributed to boto in years past. It has progressed by
leaps and bounds since then, but I still don't see it mentioned in the AWS
blog posts when Ruby/Java/PHP get new shinies.

~~~
dorfsmay
Or good Python3 support for that matter, sigh...

~~~
Twirrim
[http://aws.amazon.com/blogs/aws/boto-
python-3/](http://aws.amazon.com/blogs/aws/boto-python-3/)

Boto has supported Python 3 since early August :)

~~~
dorfsmay
Oh wow, finally! Totally missed that.

After spending so much effort trying to get boto 3 to work with python 3 I
completely gave up and re-wrote all my scripts in python 2. August isn't that
far away.

------
andrewstuart
Does anyone know to what extent are the botocore JSON service descriptions
similar to Swagger service descriptions? Or are they entirely different?

------
slapresta
The SOAP dream is alive, after all!

------
gravitronic
Hah, I've been building a similar general approach for any rest service:
[https://github.com/boourns/restgen](https://github.com/boourns/restgen)

------
xiaoma
Why is it so many of these submission titles tend to include "in Go" at the
end?

There are many, many submissions of things written in many languages and they
don't generally append "in Scala", "in JavaScript" or "in Julia", etc., unless
it's a post specifically about the language features or experience of writing
the given software in that language.

When it's a tool such as this, is there some reason why it matters to a user
if an app was written in Go specifically? Are Go users just particularly
zealous? Honest curiosity here.

~~~
nknighthb
Really? Code generation tools shouldn't mention the language they generate
code for?

(Put another way, you might want to take a moment to understand what the tool
is before you use it as an excuse to complain about Go.)

------
kapilvt
very excited about this, given the breadth of aws services, this seems the
only sane way to get solid coverage. thanks

