People getting started with cloud computing often ask me which AWS service they should use to deploy their applications on the cloud.
There is no simple answer. The best choice always depends on the variables — but you probably knew that already.
In this article, I will describe the main considerations that you need to be aware of prior to moving to the cloud (or not moving at all). Then we will dive into the AWS field by exploring the main features, and most common use cases for the following services: EC2, ECS, CodeDeploy, OpsWorks, and Elastic Beanstalk. We’ll explore which AWS service best meets your needs.
Why the Cloud?
In a traditional scenario, you usually would have a pre-defined amount of resources available for your applications pool. To provision the right amount of resources you need to predict and purchase hardware/software assets capable of handling your applications in maximum load. However, you will only need 100% of your resources for very short periods of time. After these peaks, some of your resources will be idle.
The obvious and painful problem is, that when part of your infrastructure is idle, you still pay for it. Even worse, you need to manage the whole thing all the time. Also, some resources eventually break down, whether used or not, and you will be responsible for repair and maintenance.
I believe one of the greatest advantages of the cloud is control over the ability to consume resources in ways you want. Very likely money will be saved in the process.
Which AWS Service to use: moving to the AWS cloud
AWS has 50+ services and this array of options might not be simple for beginners to select the best option. In the next sentences, I will present you the most common AWS services to that you can use to deploy your applications. I include consideration for such things as main features, use cases, elasticity, scalability, manageability, and complexity.
EC2 stands for Elastic Compute Cloud and is the most basic compute service that AWS provides. Using EC2, you can create virtual machines, called instances, where you can deploy basically any kind of application, and use any deployment tools available (e.g. Jenkins, Vagrant, Chef, Puppet, Docker, etc.), with a few limitations.
Since EC2 is highly flexible, and you have full control over your instances, AWS assumes you’ll also be taking care of all the management tasks and some security responsibilities. That might be everything that you want, but this solution may be a bit complex and time-consuming. In order to achieve elasticity and scalability in your applications, you would need to configure or automate many things, including tools such as Auto Scaling and ELB (or develop custom tools) on your own. That probably is not what most people are looking for when they move to AWS.
ECS stands for EC2 Container Service and as you can probably guess, will run on top of the EC2 service. This service was specifically designed to deploy Docker containers in the AWS cloud. ECS makes
it possible to deploy Docker containers in a simple way, and AWS will handle the deployment and allocation of your containers inside your EC2 instances. With ECS you can define Clusters of Instance Containers and Create tasks. Very handy.
The greatest advantages of ECS is that it uses the images available in the Docker Hub and is easy to integrate with tools such as Elastic Load Balancer (ELB) and Auto Scaling (AS). There is no need to write custom scripts to manage scalability and elasticity because AWS provides this out of the box. Additionally, it is easy to achieve High Availability by using a Multi Availability Zone deployment. You simply specify the proper configuration options for this and AWS will take care of the rest. Even better, this service is free of charge! You only pay for the resources that you will be using (e.g. EC2 and ELB) and nothing more.
If you want to easily deploy a container application and have your entire infrastructure described in your code, you’ll probably find this service the right fit for your application.
OpsWorks is a service that helps you manage your infrastructure by using Chef recipes. Using OpsWorks you can easily create a stack and define layers for your applications, grouping the relevant pieces of your applications together. Doing this, you can have an application layer and a database layer, and manage everything in a single place.
You can choose between starting your application from scratch on OpsWorks or you can add existing resources to it. OpsWorks easily integrates with AWS’ services, and works with both EC2 instances or on-premises machines running either Linux or Windows. To do this, install the OpsWorks agent in the machines that you want to use.
OpsWorks is great for managing web applications and for managing large fleets of servers. The servers can be running enterprise solutions (for example), since you will be using a single point of management and applying changes to your servers via Chef recipes, it will be easy to maintain, operate, and test your deployments.
Which AWS service should you use? If you are planning to use this service with only AWS resources the service will be free. You will only pay for the resources that you use.
If you want to manage your application using Chef recipes, you’ll enjoy the freedom of choosing any operating system, and easily integrating your stacks with ELB, AS or Relational Database Service (RDS). This is the optimal service for your application.
CodeDeploy is a service that helps you automate your software deployments. This service offers you the opportunity of deploying new versions of your software using either EC2 instances or on-premises machines. To get started with the service you need to configure a new application in CodeDeploy and specify some Deployment Groups (e.g. Dev, Test, Prod), in your machines you will have to install the CodeDeploy agent, configure some tags and grant it some Identity and Access Management (IAM) permissions.
With CodeDeploy you are free to use Windows or Linux as your operating system. You are also free to specify your deployment scripts with the language you choose, as long as the machine that is running the code is able to execute it. You will still need to add in your code a YAML file called AppSpec file. You will also need the deployment scripts that you want to use. This service has some cool features out of the box, such as integration with AS and ELB for zero downtime deployments. As with OpsWorks, this service is free when you use it with EC2 instances. Otherwise, you pay a small amount for each on-premises machine.
Which AWS service should you use? You should consider this service if you want to automate your deployments without having to master tools such as Chef or different scripting languages. You’ll enjoy the ability to integrate CodeDeploy with many third party services/tools by adding CodePipleline in the mix, as we demonstrate in the AWS Developer Fundamentals course.
If you have read this post so far and have no idea what AS, ELB, RDS mean in a practical/technical way, then Elastic Beanstalk is the right service for you. With Elastic Beanstalk, you can easily jump in with AWS and deploy web applications in a few minutes using Java, .NET, PHP, Node.js, Python, Ruby, Go, or Docker
Elastic Beanstalk will automate almost everything for you. It will manage AS, ELB, and configure your RDS instances. AWS has designed Elastic Beanstalk to be as simple as possible. You simply create an Application inside of it and create as many Environments as you want. It is also worth noting that Elastic Beanstalk integrates well with CodePipeline for continuos delivery.
Which AWS service should you use? If you just want to deploy your applications using AWS and don’t want to worry about elasticity, scalability, and all the management tasks that you would normally to perform, This is your service. Again, like the others, this service is free. You pay for the AWS resources that you use.
When someone enters a supermarket in search of a box of breakfast cereal he/she is often blinded by the unmanageable and uncurated selection. Do you want hot or cold, what flavor, what kind of nutrition, wheat, rye, etc. Not wanting to engage in a research project people often default to what they know to the detriment of what they might gain. I have selected a curated group of AWS services that should serve to bring clarity. There are many more services with a plethora of features. Over time, you might shift from one to the other as your need changes. The important part is getting started with something new that will make your life and work better.
I hope you enjoyed reviewing these AWS Services with me and that you’ll comment below if you want to add to the discussion.
Advantages and Disadvantages of Microservices Architecture
What are microservices? Let's start our discussion by setting a foundation of what microservices are. Microservices are a way of breaking large software projects into loosely coupled modules, which communicate with each other through simple Application Programming Interfaces (APIs). ...
Kubernetes Services: AWS vs. Azure vs. Google Cloud
Kubernetes is a popular open-source container orchestration platform that allows us to deploy and manage multi-container applications at scale. Businesses are rapidly adopting this revolutionary technology to modernize their applications. Cloud service providers — such as Amazon Web Ser...
AWS Internet of Things (IoT): The 3 Services You Need to Know
The Internet of Things (IoT) embeds technology into any physical thing to enable never-before-seen levels of connectivity. IoT is revolutionizing industries and creating many new market opportunities. Cloud services play an important role in enabling deployment of IoT solutions that min...
Which Certifications Should I Get?
As we mentioned in an earlier post, the old AWS slogan, “Cloud is the new normal” is indeed a reality today. Really, cloud has been the new normal for a while now and getting credentials has become an increasingly effective way to quickly showcase your abilities to recruiters and compan...
How to Go Serverless Like a Pro
So, no servers? Yeah, I checked and there are definitely no servers. Well...the cloud service providers do need servers to host and run the code, but we don’t have to worry about it. Which operating system to use, how and when to run the instances, the scalability, and all the arch...
AWS Security: Bastion Hosts, NAT instances and VPC Peering
Effective security requires close control over your data and resources. Bastion hosts, NAT instances, and VPC peering can help you secure your AWS infrastructure. Welcome to part four of my AWS Security overview. In part three, we looked at network security at the subnet level. This ti...
Top 13 Amazon Virtual Private Cloud (VPC) Best Practices
Amazon Virtual Private Cloud (VPC) brings a host of advantages to the table, including static private IP addresses, Elastic Network Interfaces, secure bastion host setup, DHCP options, Advanced Network Access Control, predictable internal IP ranges, VPN connectivity, movement of interna...
Big Changes to the AWS Certification Exams
With AWS re:Invent 2019 just around the corner, we can expect some early announcements to trickle through with upcoming features and services. However, AWS has just announced some big changes to their certification exams. So what’s changing and what’s new? There is a brand NEW ...
New on Cloud Academy: ITIL® 4, Microsoft 365 Tenant, Jenkins, TOGAF® 9.1, and more
At Cloud Academy, we're always striving to make improvements to our training platform. Based on your feedback, we released some new features to help make it easier for you to continue studying. These new features allow you to: Remove content from “Continue Studying” section Disc...
AWS Security Groups: Instance Level Security
Instance security requires that you fully understand AWS security groups, along with patching responsibility, key pairs, and various tenancy options. As a precursor to this post, you should have a thorough understanding of the AWS Shared Responsibility Model before moving onto discussi...
Cloud Migration Risks & Benefits
If you’re like most businesses, you already have at least one workload running in the cloud. However, that doesn’t mean that cloud migration is right for everyone. While cloud environments are generally scalable, reliable, and highly available, those won’t be the only considerations dri...
Real-Time Application Monitoring with Amazon Kinesis
Amazon Kinesis is a real-time data streaming service that makes it easy to collect, process, and analyze data so you can get quick insights and react as fast as possible to new information. With Amazon Kinesis you can ingest real-time data such as application logs, website clickstre...