What is our primary use case?
We primarily use Elastic Beanstalk to deploy web applications, mostly built with Django, Laravel, or even native PHP. It provides two options: deploying directly on EC2 or using a Dockerized environment on EC2. This distinction is crucial because Elastic Beanstalk manages your entire platform's environmental configuration. For example, with Django, it handles your Python virtual environment. Similarly, for PHP, it takes care of PHP-FPM configurations, NGINX configurations, and more.
Another incredibly useful feature is the ability to add configuration files directly to your repository. These files allow you to make modifications to the environment. For instance, you can alter server settings like maximum memory or adjust NGINX configurations. These changes are automatically applied through pre-deployment and post-deployment hooks.
Furthermore, we install certificates directly within Elastic Beanstalk using our repository. This eliminates the need to SSH into the server. It's all streamlined and readily available out of the box.
What is most valuable?
One of the most valuable aspects is that developers can access logs directly. They can download them from the AWS console within Elastic Beanstalk, eliminating the need to request logs from me. This allows them to quickly retrieve, for instance, the last hundred lines of logs.
Another key benefit is the seamless management of rollbacks. If any issues arise during deployment, your website keeps on running. This is because deployments occur in a separate folder. Once deployment is complete, a simple folder rename ensures a swift website update, typically taking only a second or two.
Furthermore, session management between Elastic Beanstalk and RDS is handled very well and efficiently. You don't have to worry about sessions as they are preserved while code updates are seamlessly applied in the background.
What needs improvement?
From what I've observed, it seems AWS has ceased further development on Elastic Beanstalk. Perhaps they're shifting their focus away from it. They've discontinued many features and are even recommending alternatives like EKS and other serverless services. I've also come across numerous questions online from people encountering issues with Elastic Beanstalk.
It seems to be a common concern that AWS is no longer prioritizing Elastic Beanstalk. Instead, they appear to be concentrating on serverless offerings. While this may be disappointing for Elastic Beanstalk users, I believe it's a positive move. Serverless represents the future.
AWS could consider adding more platforms as managed services within Elastic Beanstalk. Currently, they offer around five or six. However, since it already provides a Dockerized environment, you can essentially run any language you prefer. So, in my view, they pretty much have everything covered at the moment.
For how long have I used the solution?
I've been working with AWS Elastic Beanstalk for four years now, and it's still working great. I’m currently using it for new projects as well.
What do I think about the stability of the solution?
I find it to be stable. While every service has its pros and cons, Beanstalk is genuinely stable if you monitor it properly. To be honest, it rarely goes down. If you configure AWS services correctly with alarms, Elastic Load Balancing, and other best practices, downtime should
What do I think about the scalability of the solution?
It's definitely scalable. You simply need to specify the desired number of instances. However, it doesn't offer automatic scaling. You have to define the range of servers you want running at all times. For example, you could set a minimum of two instances and a maximum of five or ten. Within that range, it scales automatically.
For Elastic Beanstalk, we're running around ten to twelve environments. I manage the DevOps side for most of them, but developers also utilize it to access logs and monitor deployments. This simplifies their workflow significantly, as they can easily verify if everything is deployed correctly in their dev and stage environments. They don't typically access production, though.
How are customer service and support?
We reached out to AWS support in early 2021. We were having trouble deploying .ebextensions files. We wanted to run certain commands, like Cron jobs, within Elastic Beanstalk using the repository. They were very helpful and assisted us in resolving the issue.
How would you rate customer service and support?
Which solution did I use previously and why did I switch?
I've used AWS and also explored other vendors, like competitors. I've tried Google App Engine. I was searching online for alternatives to Elastic Beanstalk, and App Engine came up as a potential replacement as a Platform as a Service offering.
They provide a similar YAML file for configuration and deployment, but I found it quite confusing. We encountered a lot of errors, and it wasn't very straightforward to deploy. There were many things to consider initially, including the versions of your application and App Engine itself. App Engine offers limited versions of PHP, Python, and other languages, which can be restrictive.
This version limitation was a major issue we faced with App Engine. Ultimately, we decided not to proceed with it and stayed with Elastic Beanstalk.
How was the initial setup?
Initially, we deployed using both the console and the CLI. The CLI is faster and provides more control than the console, but we generally prefer the console. We use a multi-tier architecture with two EC2 instances and one load balancer.
Importantly, we do not include the database directly within the Elastic Beanstalk installation. This is because if you add RDS to Elastic Beanstalk, deleting the environment also deletes the database. There's no way to avoid this, which is a significant drawback.
Next, we have AWS CodePipeline configured to pull code from GitHub or Bitbucket. We then deploy it directly, potentially including stages like CodeBuild for testing or SonarQube for analysis, if needed.
Deployment itself is straightforward. You simply select your Elastic Beanstalk environment and the application you want to deploy, such as dev, prod, or stage.
Crucially, you need two folders in your repository: .ebextensions and .platform. .ebextensions provides additional control. For instance, you can place commands.config within it to execute platform-specific commands. These could include running database migrations after deployment or other post-deployment actions.
We primarily utilize .platform for NGINX configuration, PHP configuration, or any other platform-level adjustments.
Finally, we just push the code to GitHub, triggering an automatic deployment. Any errors that occur are visible in the console or CloudWatch.
I recommended this to a friend, and it took him about a week. However, he encountered numerous issues and had to consult me multiple times because he couldn't find the right answers online. So, for him, it took about a week to complete the deployment.
What about the implementation team?
The deployment process would ideally require two people if you want to do it really quickly. You should also have a solid understanding of the server side, especially with Linux.
It does require maintenance. Sometimes the code doesn't deploy on the server for some reason. The servers get stuck, and the deployment fails. You have to manually restart the EC2 instance. You can't always rely on the code deploying automatically. It happens to us about once every four months, but it does happen from time to time.
What was our ROI?
The time-saving is immense. We don't have to manage the Linux server, patch it, update packages, or worry about restarts and weekly maintenance. It handles all of that automatically. Deployment is incredibly fast, as developers simply push to branches, which then trigger automatic deployments to Elastic Beanstalk.
Overall, the deployment process is streamlined, maintenance is minimal, and it saves us a tremendous amount of time.
What's my experience with pricing, setup cost, and licensing?
Elastic Beanstalk itself is free of cost. You only incur costs for the EC2 instances or load balancers you're running with it. The platform itself is completely free.
What other advice do I have?
Overall, I would rate it a nine out of ten. I would recommend it to other people. If they're trying to deploy a web application on any cloud provider, I'd strongly suggest going directly with Elastic Beanstalk instead of managing an EC2 instance themselves. It's much simpler to use Elastic Beanstalk and deploy your code out of the box. It just works.