Elastic Beanstalk and CloudFormation

Natasha Ong
This is some text inside of a div block.
4 min read

In a nutshell:

AWS Elastic Beanstalk is perfect if you want a stress-free way to set up your EC2 environments and focus on your applications.
AWS CloudFormation is like having a smart robot build your AWS resources efficiently, consistently and error-free, perfect for infrastructure management.

On top of the Management Console, SDKs and the CLI, there are also other ways you can manage your AWS environment using managed tools.

Let's learn about AWS Elastic Beanstalk and AWS CloudFormation!

AWS Elastic Beanstalk

AWS Elastic Beanstalk simplifies the process of handling Amazon EC2-based environments.

You write your application code and configuration settings to Elastic Beanstalk, and it deploys the resources necessary to do the following tasks:

  • Adjust capacity
  • Load balancing
  • Automatic scaling
  • Application health monitoring

Why we love Elastic Beanstalk

  • Easy-peasy setup: Instead of manually configuring everything (from scaling to managing traffic) on your Management Console, you just provide your code and the settings you want to AWS Elastic Beanstalk. Then, like magic, it gets your environment up and running for you.
  • Save your settings: AWS Elastic Beanstalk lets you save your environment configurations so that you can quickly use them again later.
  • Control: You get to focus on your awesome business application while AWS Elastic Beanstalk handles the techy stuff underneath. At the same time, you retain full control over the AWS resources powering your application and can access the underlying resources at any time.

AWS CloudFormation

AWS CloudFormation is like having your infrastructure on autopilot. It's a tool that lets you define a bunch of AWS resources in a straightforward way using JSON or YAML* templates.

*YAML is like a special language for computers that helps them understand and follow instructions. Just like JSON, YAML is used to organise and store data. YAML is more beginner friendly compared to JSON. It uses easier formatting and simple language, so it's easier to read and write.

Why we love CloudFormation

  • Infrastructure as code (IaC): It's all about letting you write lines of code to get your AWS resources up and running, without manually clicking around in the AWS Management Console. This also means rapid, consistent deployments.
  • Say what you want: You tell it what you want to build, but you don't need to stress about how to build it. This is also called declarative resource definitions. In CloudFormation, using JSON or YAML documents (called CloudFormation templates) lets you express your infrastructure requirements clearly without having to specify how AWS should build it.
  • Resource variety: AWS CloudFormation isn't limited to EC2-based solutions. It covers a bunch of AWS resources, from storage to databases, analytics, and more.
  • Parallel resource provisioning: Once your resources are defined in a CloudFormation template, AWS CloudFormation parses the template and commences the parallel provisioning of all the specified resources.
  • Fast and efficient: You create a template, and AWS CloudFormation handles all interactions with the underlying AWS APIs automatically. It's pretty darn efficient! A common word that describes CloudFormation is parallel provisioning, which is when computers are doing separate parts of the same tasks at the same time to complete is faster. It also creates a safe and consistent environment across multiple accounts or regions by letting you run the same template in different contexts.
  • Automated, error-resistant process: AWS CloudFormation reduces the risk of human error  by automating the resource provisioning process. It can also roll back changes automatically if it detects errors.