Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automation using AWS Elastic Beanstalk vs AWS CodeDeploy

I am using AWS Elastic Beanstalk and have deployed my nodejs app on it. Now I want to automate this process i.e committing changes to Github and then automatically reflecting those changes in app. Now I have two options, use whether Elastic Beanstalk or using Code Deploy. I have searched on both services,

  • I can automate using deployBot with elastic beanstalk or using jenkins plugin for automation (AWS Elastic Beanstalk Deployment Plugin) for elastic beanstalk. Also found this link to automate: https://aws.amazon.com/blogs/devops/building-continuous-deployment-on-aws-with-aws-codepipeline-jenkins-and-aws-elastic-beanstalk/

  • I can also use AWS CodeDeploy service for automation to deploy my app on EC2 instances using CodeCommit , code pipeline. In case of code deploy I can also do by using this: https://aws.amazon.com/blogs/devops/automatically-deploy-from-github-using-aws-codedeploy/

Now both services can be used , but which one is more suitable to use. That will automate my process whether using AWS Elastic Beanstalk or AWS Code Deploy.

like image 393
Muhammad Shahzad Avatar asked Nov 10 '17 07:11

Muhammad Shahzad


2 Answers

The biggest difference is, that:

  • CodeDeploy is the service that deploys your application to the existing EC2 instance(s). It does not take into account LoadBalancing or scaling etc.
  • ElasticBeanstalk is more of the PaaS service, that provides you all the wrapping you need to scale your application so you don't need to worry about the DevOps aspect. Like monitoring, scaling etc.

I found this image to describe the differences nicely. Including as well OpsWorks: aws-cloud-deployment

If you want to read more about differences of CodeDeploy, Elastic Beanstalk or OpsWorks, check out AWS own document: https://d0.awsstatic.com/whitepapers/overview-of-deployment-options-on-aws.pdf

like image 77
Maksim Luzik Avatar answered Nov 12 '22 20:11

Maksim Luzik


The answer is very simple. ElasticBeanstalk offers cookie-cutter automated deployments based on a set of AWS common practices. CodeDeploy is broadly configurable and customizable.

You should use ElasticBeanstalk until you find a use case that cannot be resolved without using CodeDeploy (two use cases suggested by the AWS Documentation posted by Maksim Luzik are deploying to EC2 instances managed internally by your organization and deploying to EC2 instances for third-party integration).

like image 5
Arlo Guthrie Avatar answered Nov 12 '22 21:11

Arlo Guthrie