Amazon CloudWatch Posts

Amazon CloudWatch Alarms vs. Events (or EventBridge)

Amazon CloudWatch Alarms vs Events (EventBridge)

If you maintain 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.

3 Ways to Schedule AWS Lambda and Step Functions State Machine Executions

Scheduling AWS Lambda and Step Functions Executions

In addition to API development, AWS Lambda has many use cases. One of them is running some background jobs in scheduled intervals. Besides, if you need a chain of sequential or parallel AWS Lambda functions, the ideal way to orchestrate them is using AWS Step Functions.

In this post, I will talk about how to schedule your AWS Lambda functions or Step Functions state machine executions using AWS CloudWatch and EventBridge consoles as well as AWS Serverless Application Model (SAM) and CloudFormation templates. Read more at 3 Ways to Schedule AWS Lambda and Step Functions State Machine Executions post.

Configuring Rails Logging for Docker on Amazon ECS & Fargate

When you dockerize a Ruby on Rails application on AWS, it is essential to configure logging correctly to monitor application health. There are some tweaks to achieve this and I will briefly describe the process in this blog post.

Firstly, let’s make a brief introduction to Docker along with its deployment options on AWS. Read more at Configuring Rails Logging for Docker on Amazon ECS & Fargate post.

Storing and Monitoring Rails Logs on Amazon CloudWatch

If you deploy any type of application on AWS, such as a Ruby on Rails web app; then your application will generate large amounts of logs. Hence, you will need to store and monitor these logs somewhere to understand what is going on when an unexpected event occurs. A central log server may be a choice; however, Amazon CloudWatch offers an alternative way without maintaining your log servers and with lots of capabilities.

In today’s blog post, I will describe how you can start storing your application logs on Amazon CloudWatch by using a Ruby on Rails web application as an example. The same principles here would apply to other types of application logs as well. Read more at Storing and Monitoring Rails Logs on Amazon CloudWatch post.