0

I want to be able to make a commit to my repo via GitHub WebUI, and have a webhook start a eb deploy process of the new HEAD commit automatically.

I understand there are tools for this (CodePipeline/CodeDeploy), but it isn't clear if those tools work with Elastic Beanstalk. Using such a comprehensive solution for such a simple problem also seems like over-engineering (read: unnecessary overhead). Surely there is a simpler way.

Background: The app I'm working on outgrew its shared host environment, so I moved it to AWS using Elastic Beanstalk. Previously I was auto-deploying updates on a shared host with a simple PHP script. When I would git push, the webhook would hit that script via HTTP, and the script would run a git pull origin mybranch, which would retrieve any updated files.

Right now I can log into a Cloud9 IDE to git pull && eb deploy code updates, but this isn't an ideal solution if I want to let other developers deploy changes.

I tried re-implementing that old solution on Elastic Beanstalk, but the ephemeral nature of EC2 instances means I can't save a SSH keypair or known_hosts on there.

0

Have you checked out the EB integration with Git,

https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb3-cli-git.html

And this question might be more suited for Stackoverflow, with the same tag.

  • I'm already using that eb CLI to git pull && eb deploy. Unfortunately, it lacks the commit hook integration I'm talking about: it requires using the AWS CLI to actually deploy the changes to the environment. That has to be run from somewhere, so it it would require maintaining a secondary "deploy" server. I didn't think this fit with StackOverflow since it's about code deployment and not programming. I'd posted this here after reading this answer: meta.stackexchange.com/a/141944/286262 That answer was from 2012 though, so maybe times have changed..? – Eric Seastrand Aug 30 '18 at 23:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.