Amazon EC2 Posts

Configuring Amazon EC2 Instances With AWS CloudFormation

Managing Amazon EC2 Instance configurations With AWS CloudFormation

In this blog, I talk about the benefits of defining your infrastructure as code using AWS CloudFormation from time to time. You define the properties of your AWS resources in a template and create a stack from it. When you need an update, you edit your template accordingly and update your stack. Don’t need a resource anymore? Just remove it from your template and update your stack again. Or, delete your stack if you no longer wish to keep any of its resources. In an ideal scenario, you keep your infrastructure code, your CloudFormation templates, in the same repository as your project and use a CI/CD pipeline to deploy it.

You can manage most AWS resources with AWS CloudFormation like this. However, Amazon EC2 instances are somewhat different. Again, you have properties like the subnet, instance type, or security groups of an EC2 instance as in other resource types. But, you also make custom, OS-level changes after creation, such as installing software packages, downloading or configuring files, etc. Besides, you may need to update this configuration later. It is why configuring an EC2 instance with CloudFormation needs more attention, and we have a dedicated section about it in my AWS CloudFormation Step by Step: Intermediate to Advanced course.

In this post, I will summarize how to manage EC2 instances using AWS CloudFormation. Firstly, we will discuss the UserData property. Then, we will continue with AWS CloudFormation helper scripts: cfn-signal, cfn-init and cfn-hup. We will also see the CreationPolicy attribute along the way. So, let’s start!

Continue reading the Configuring Amazon EC2 Instances With AWS CloudFormation blog post.

Which AWS Elastic Beanstalk Deployment Method Should You Use?

Elastic Beanstalk Deployment Methods

Let’s say that you are a developer building awesome applications using Node.js or Python but lacking the knowledge and experience necessary to configure AWS environments. No worries! Elastic Beanstalk can make your life easier by handling configuration details. It uses preconfigured CloudFormation templates and provisions a scalable, load-balanced, and reliable environment for your application. It supports many programming languages, giving you less control but less worry in return. You can start from a single instance and make your architecture grow into a multi-instance cluster.

Although it may sound simple until now, Elastic Beanstalk is more than described here. It provides you many deployment options, and you can select one of them depending on your environment and use case. In this post, I will explain the options and when to consider them.

Continue reading the Which AWS Elastic Beanstalk Deployment Method Should You Use? blog post.

Automating Ruby on Rails Deployments with AWS CodeDeploy

Ruby on Rails deployments with AWS CodeDeploy

Automating deployments of your web applications brings many benefits, especially when you run them on AWS. You standardize the process, prevent human errors, and can integrate with other AWS services like EC2 Autoscaling and Elastic Load Balancing. Today I will talk about how to automate your Ruby on Rails deployments using AWS CodeDeploy.

Continue reading the Automating Ruby on Rails Deployments with AWS CodeDeploy blog post.