How To Test AWS Lambda: Everything You Need To Get Started.

If you’re just starting out working with AWS Lambda there are a LOT of things for you to understand. And of course, one of those areas is going to be: testing.

How to test AWS Lambda? AWS Lambda can be tested manually using the AWS console with test events. In addition to manual testing, AWS Lambda can also be tested through local replication with tools like as docker-lambda. Or finally, testing AWS Lambda can be done using an automated (CI) pipeline for running unit, component and integration tests. 

There’s a few different ways you can go about testing AWS Lambda, today we’ll run through these different options, and I’ll let you know what has worked best in my experience and where I’d suggest you spend your energy on.

How To Debug AWS Lambda: A Detailed Overview

Ah, so you’ve reached that point: you’ve been through the euphoria and the buzz of setting up a Lambda function, and the eureka moment when everything is running… but then everything comes crashing down when you realise how painful debugging AWS Lambda is! I know, because I’ve been there too.

How to debug AWS Lambda? Debugging AWS Lambda is achieved through a range of different methods: using local debugging tools e.g. docker-lambda and serverless offline, through monitoring tools e.g. CloudWatch and through the implementation of a test harness. 

The topic of debugging an AWS Lambda function can get complicated quickly, as there’s lots of different options and approaches. Today I’ll walk you through all the different options that you have at your disposal for debugging AWS Lambda. Today we’ll cover everything from Docker Lambda to CloudWatch. 

Lambda Extensions: What Are They, And Should You Care?

This month AWS announced a new feature called Lambda Extensions (Source). AWS release so many features it is hard to keep up. With each new feature we often need to ask ourselves, is this something we should pay attention to or not?

What is Lambda Extensions, and who should pay attention to it? Lambda Extensions are an addition to the Lambda Runtime API, allowing additional control, setup and tooling. Lambda Extensions are mainly aimed at third-party vendors, particularly monitoring but also configuration and security. Lambda Extensions will also be interesting to heavy users of AWS Lambda functions who need standardisation or greater control on their setups. 

Now let’s get into more detail on what Lambda Extensions actually are to help you understand whether or not they might be useful in your situation. Let’s start by looking at a core difficulty that Lambda Extensions help solve.

Can You Stop An AWS Lambda Execution?

There are a few reasons why you may want to stop a Lambda. Either the Lambda is buggy or performing incorrectly, your Lambda is reading an event source like kinesis and you need to pause it, or your Lambda is being constantly retried.

Can you stop an AWS Lambda Function? There is no way to stop a currently executing AWS Lambda function. But you can stop future invocations by setting concurrency to zero or disabling integrations. 

So, there’s a few different aspects to the topic of stopping a Lambda. Let me take you through some different options for stopping your AWS Lambda function so that you can decide which one makes most sense for your situation.

Can You Learn AWS On Your Own? How To Ensure Success.

There are many ways to learn AWS. But the thought of learning anything new on your own definitely seems daunting, right? So you might be wondering if AWS is one of those topics where it possible to teach yourself. Today, I’ll answer that.

Can you learn AWS on your own? Yes. Learning AWS can be done through self-study and that’s the same way that many learn AWS. There are also many online courses and communities to help you learn AWS on your own. 

So, there you have it! AWS can be learned on your own. But of course, there’s more to it than that. I do have a bunch of hints and tips that can make learning AWS on your own that little bit easier, if you’re curious, read on…

aws logo

What Are The Pre-Requisites To Learning AWS? 5 Topics You Probably Should Look Into First.

So, I’m guessing you’re new to AWS? If you are—you might be wondering what different things you should understand before deep diving into your learning. Well, you’re in the right place, since that’s exactly what we’ll discuss today.

What are the prerequisites to learning AWS? There are no mandatory pre-requisites to learning AWS. However knowledge of topics such as: the internet, command line interfaces, programming and “infrastructure as code” can be beneficial and might speed up the learning process. 

aws logo

But of course, it’s not very useful to just list these topics, let’s go through and discuss why and how these areas can help as pre-requisites to learning AWS.

Does AWS Require Coding? Understanding When You Might Need To Code.

AWS (Amazon Web Services) is a cloud computing platform popular with tech companies and engineers. When it comes to working with AWS a question that comes immediately to most people is: “Will I need to code to use AWS?”

Does AWS require coding? No. Getting started with and learning AWS does not require any coding skills, many basic tasks can be performed without coding. However dependent on the job / skills you have (or need) you may still be required to learn some programming skills. 

As always, there’s some nuances to the question. Whilst I might not know your exact personal circumstance, we can still look at examples of tasks you can complete in AWS with and without coding skills, and we can also go through and understand the situations that require coding and why.

Can AWS Lambda Access A Database? And The Considerations You Should Be Taking.

Architecting solutions using AWS Lambda means understanding many nuances in how AWS works, and a main consideration for our application architecture is the database. So we’ll need to need to know whether AWS Lambda can connect to a database at all, and what our options are.

Can AWS lambda access a database? Yes. AWS Lambda can connect to an AWS hosted databases such as RDS or DynamoDB. AWS Lambda can also connect to external databases which are public or grant network access. 

Dependent on the database you’re using (or intending to use) there are some considerations you should address. Let’s now go through the different options you have for integrating a database with AWS Lambda, and address some of those considerations so you can make an informed decision.

Lambda Logo

Is AWS Easy To Learn? (And How You Can Make It Easier)

Are you just starting out learning AWS? AWS has lots of services and it can be daunting when you’re just starting out. Staring at all those online resources, articles and courses gets you wondering: How easy will it be to learn all AWS?

So is AWS easy to learn? Learning AWS can be quick an easy and can take as little as a few days up to a few months. But, the exact time it’ll take you to learn AWS depends on your past experience.

aws logo

Okay, so that gives you a rough idea of how long you can expect to learn AWS. But exactly how easy AWS is to learn depends on your past experience. So let’s dig a little deeper into factors which affect how easy learning AWS will be.

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.