Deploying a simple GoLang Application to AWS Elastic Beanstalk (echo framework)

  1. Create ./application.go start server at port 5000
package main
import (
func init() {
func main() {
 e := echo.New()
 e.GET(“/”, func(c echo.Context) error {
 return c.String(http.StatusOK, “Hello, World!”)

2. Create a file called ./ and run chmod +x on it (it can be called anything really), with the following contents:

go get
go get
go build -o bin/application application.go

3. Create a file called ./Buildfile (this file name matters), with the following contents:

make: ./

4. Create a file called ./Procfile (this file name also matters), with the following contents:

web: bin/application

5. Zip your files together (application.go,, Buildfile, Procfile) and deploy it to AWS Elastic Beanstalk.

6. Your instance health should change to OK and you should be able to hit your web service now on port 80 (ngnix will map the request to your go app listening on port 5000).