AWS 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! Read more at Configuring Amazon EC2 Instances With AWS CloudFormation post.

Deploying CloudFormation Nested Stacks With AWS CodePipeline & AWS CodeBuild

Deploying AWS CloudFormation Nested Stacks with AWS CodePipeline

AWS CodePipeline provides AWS CloudFormation Create or update stack and Create or replace change set action types to deploy your CloudFormation stacks from your pipeline. If you have joined my AWS CodePipeline Step by Step course, you would remember our example there. We automatically create a staging stack from a CloudFormation template before the manual approval action in our pipeline.

However, AWS CodePipeline’s CloudFormation action types only create stacks from deployable stack templates. Therefore, you cannot deploy your CloudFormation nested stacks with local path template definitions directly without packaging and uploading them to an S3 bucket first. In this post, I will talk about achieving this on an AWS CodePipeline pipeline using AWS CodeBuild. Read more at Deploying CloudFormation Nested Stacks With AWS CodePipeline & AWS CodeBuild post.

Amazon CloudWatch Alarms vs. Events (or EventBridge)

Amazon CloudWatch Alarms vs Events (EventBridge)

If you are maintaining an application on AWS, you may have heard about Amazon CloudWatch already, the monitoring service of AWS. Amazon CloudWatch gathers metrics from your AWS resources such as CPU or memory usage, and your resources emit events to CloudWatch when their states change, such as an auto-scaling launch event.

You can define thresholds on your metrics and trigger alarms if those thresholds are exceeded. Besides, you can take actions on a specific event, for example, by triggering an AWS Lambda function. Hence, both features help you in monitoring the states of your resources and get notified or take proactive or reactive actions to protect the health of your workload.

Whether you are planning to use Amazon CloudWatch for the first time or preparing for an AWS exam these days, you may be wondering what the differences between these two crucial Amazon CloudWatch features are.

By the way, Amazon EventBridge is the new version of Amazon CloudWatch Events, so the topics we will talk about in this post will also be valid when comparing Amazon EventBridge with Amazon CloudWatch Alarms. So, what are the differences between Amazon CloudWatch Alarms and Events?

Read more at Amazon CloudWatch Alarms vs. Events (or EventBridge) post.

Recertified My AWS Certified Solutions Architect - Professional Certification Until December 2024

Passed AWS Certified DevOps Engineer - Professional Exam

Two weeks ago, I recertified my AWS Certified Solutions Architect - Professional certification for three more years by passing the exam with an 847/1000 score. It is one of the most valued certifications in IT and definitely the broadest and challenging exam on AWS. You need to have sufficient hands-on experience, a good understanding of how AWS services work, and knowledge of AWS best practices to do well on this exam.

Now, let me share my experiences with you if you also plan to take the AWS Certified Solutions Architect - Professional exam soon. Read more at Recertified My AWS Certified Solutions Architect - Professional Certification Until December 2024 post.

Passed AWS Certified DevOps Engineer - Professional Exam Again and Recertified!

Passed AWS Certified DevOps Engineer - Professional Exam

When you keep a blog like this, you also keep the logs of important moments in your life, such as passing AWS certification exams. Time really flies! It is hard to believe almost three years have passed since my first Professional-level AWS certification.

Last week, I retook the AWS Certified DevOps Engineer - Professional exam to recertify for three more years and passed with a 943/1000 score. There were newer services in the exam content than the previous version, and online proctoring was also a different experience. Hence, in this post, I will share my experiences with you in case you also plan to take the AWS Certified DevOps Engineer - Professional exam soon. Read more at Passed AWS Certified DevOps Engineer - Professional Exam Again and Recertified! post.

Courses

View Shikisoft's online courses

Join Our AWS Courses!

Would you like to learn AWS services like AWS CodePipeline and AWS CloudFormation in detail with hands-on examples?

Find more details on our available courses and enroll in them with a discount!

View Our Online Courses

RSS

Subscribe to this blog's RSS feed

Categories

Posts by AWS Service