I am looking for a way to deploy the go binary on amazon ec2. Currently all the tutorials I have found (1, 2) are explaining how to move the go sources on ec2 and to compile them there.
This is not what I am looking for for a couple of reasons. Among them:
- I do not want to copy all the sources
- I do not want to install irrelevant binaries (go compiler and other things)
In my opinion this is unnecessary because go has an ability to cross-compile binaries. I think that is is better to build a binary locally and to upload it on ec2.
Am I missing something here, are there any hidden pitfalls with my approach or is there a better way?
P.S. if this question is better suited for serverfault, please let me know or move it there.