alextanhongpin / go-aws-beanstalk

Deploying go to AWS Beanstalk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

go-aws-beanstalk

Zip the file contents and just upload it to AWS Beanstalk. You can choose to upload it to either the worker or web-server environment.

For worker environment, the cron.yaml will take into effect.

Remember to run chmod +x build.sh.

Carry out cross-compile to linux binary:

$ GOARCH=amd64 GOOS=linux go build -o bin/application application.go

Folder structure

  • application.go: The entry point of your application
  • build.sh: -
  • Buildfile: -
  • cron.yaml: -
  • Procfile: A Procfile is a mechanism for declaring what commands are run by your application's dynos on the Heroku platform. It follows the process model. You can use a Procfile to declare various process types, such as multiple types of workers, a singleton process like a clock, or a consumer of the Twitter streaming API
  • setup.sh: -
  • .ebextensions: -

Limitation

  • go get ./... does not work
  • AWS Beanstalk only supports up to Go v1.7 (11 July 2017). Some packages that uses context might not work.
  • AWS timezone always default to UTC.

About

Deploying go to AWS Beanstalk


Languages

Language:Go 52.8%Language:Shell 42.0%Language:Ruby 5.2%