You’re Alerting Wrong: The Why & How Of Setting An AWS Lambda Alarm Using Error Rate Percentages.

When it comes to operating Lambda, we often want to configure alarms to alert us when things aren’t running smoothly. Naturally our first choice for Lambda alarms is CloudWatch, the default monitoring service that comes with AWS.

Alarm CloudWatch

CloudWatch gives us some custom metrics out-of-the-box, such as: errors and invocation rates. But there are some problems we run into when setting up alarms based directly on these metrics.

By the end of this article you’ll understand why alarms based on default AWS Lambda Metrics can cause difficulty, how AWS Metric Math helps us to apply “context” in our alarms and make them more effective, and how to setup an alarm using metric math to calculate an error rate percentage. 

Should You Use Typescript To Write Terraform? (The Terraform CDK)

Recently, Terraform dropped an interesting new extension to their Terraform toolchain: the Terraform CDK. The new CDK allows you to write Terraform using TypeScript and Python — neat! But is the CDK as good as it seems?

Terraform Written In The CDK

I wanted to jump in to uncover the truth and understand whether writing Terraform in TypeScript really is the future, or whether it’s just another fad.

By the end of this article you’ll understand what the Terraform CDK is, how it works, and ultimately help answer the question: should you use it? 

Cloud Native Software Engineering Newsletter #14 (July 2020)

Hello again cloud friend,

It’s that time again, to go through another month of cloud news, topics and interesting articles. So grab yourself a coffee (or whatever), and let’s dig in.

To begin I must note that this months newsletter is a little behind schedule. Tardiness is definitely not something I will be making a habit from. That being said, the world is in an odd place right now and I’m definitely not the only one feeling the impacts.

However, the silver lining of the delay is that this months newsletter is packed with curious happenings, of which I’m quite excited to share. The newsletter this month is a real mixed bag, from high profile outages up to new communities popping up.

A Philosophy For Effective Error Handling (Using JavaScript Examples)

Error handling can be a confusing topic — for a long time I struggled to understand error handling myself. I found the whole topic quite mystical and daunting. I ended up subscribed to the school of thought: “let the error throw and pray”. But, over time, I learned there are simple, easy to understand strategies for error handling that lead to noticeably better results than hope alone!

If, like I did, you also have difficulty understanding error handling then you’re in the right place. After years working with JavaScript, and speaking/working with other engineers, a style of applications layout for handling errors emerged in my own work. And it’s this philosophy for error handling that I want to share with you today.

By the end of the article you’ll understand how to structure an application to handle errors effectively, achieve more understanding of the application, deliver better error messages and have an easier time debugging.

How To Setup Monitoring / Observability On Existing Software (e.g. A Web API): A Practical 5 Step Guide.

Recently I find myself in the position of applying monitoring to existing software applications quite often. Whilst I have been applying the monitoring tools, I noticed that I follow the same steps each time…

Request Invocations

Which got me thinking: “Could you create a ‘recipe’ or ‘cookbook’ for how to apply monitoring to an existing software application?”. I set to work writing this article, and I can conclude, the answer is: yes!

By the end of this article you’ll know the 5 steps you should take when setting up monitoring on an existing service. 

How Do You Look at Console.Log Output of an Amazon Lambda Function?

Are you creating a lambda function? Are you currently debugging wondering where you can access the output of your console.log entries?

Understanding how logs work is a common confusion area when working with AWS Lambda. Today, we’re going to clear up the confusion and get your hands on your AWS Lambda logs so that you can start to debug your Lambda function.

By the end of this article you’ll understand how and where console.log output goes from an AWS Lambda function, and also how to debug your AWS Lambda setup if you’re still not seeing log output. 

Cloud Native Software Engineering Newsletter #13 (June 2020)

Hello friend,

This past month I’ve given the website a new lick of CSS paint. That’s a new body new font and a simpler white design. Let me know what you think! And in other news this month I started officially writing up reader questions, and writing up cloud book summaries (more on both of these later on). But now it’s time to take a look through the happenings of May 2020 within the cloud world.

Book Summary: “Building Microservices” By Sam Newman

1 Sentence Summary: Building Microservices allows us the opportunity to tackle software complexity and deliver faster; if (and it’s a big if) we build our services right: choosing the right tech, interfaces and integration patterns.

Building Microservices Book

Microservices are a way of breaking down applications into their parts so that businesses can deliver the components separately, experiment with distinct technology stacks and create clear boundaries between business logic.

But building microservices isn’t easy an easy task. With microservices you need to consider many things, such as: how (and where) you split the services, how they talk to each other (integration) and what data they share.

It’s in-vogue at the moment to debate on the virtues of Microservices vs. Monoliths. But ultimately they’re just two different architectural patterns that solve different use cases. Ideally you should understand both patterns.

Here are my three big takeaways:

  • An architect is a town planner
  • Microservices are data abstractions
  • Independently deploy services

Terraform: How To Rename (Instead Of Deleting) A Resource

Are you trying to rename or move a Terraform resource and Terraform is now trying to re-create your resource rather than referencing the existing one?

It’s a common issue, and the answer is quite straight-forward. Today we’ll cover how you can move a Terraform resource instead of deleting it.

By the end of this article you’ll understand how to rename, instead of deleting a resource and the reasons for how / why it works.