2020-01-28
2751
#node
Darko Milosevic
13185
Jan 28, 2020 ⋅ 9 min read

Testing Node serverless applications — AWS Lambda functions

Darko Milosevic I'm a JavaScript developer who loves exploring, coding, and blogging — but only because it's fun.

Recent posts:

too many tools: How to manage frontend tool overload

Too many tools: How to manage frontend tool overload

Read about how the growth of frontend development created so many tools, and how to manage tool overload within your team.

Shalitha Suranga
Sep 11, 2025 ⋅ 12 min read
shruti kapoor the modern ai stack

What you actually need to build and ship AI-powered apps in 2025

Discover what you actually need to build and ship AI-powered apps in 2025, with tips for which tools to choose and how to implement them.

Shruti Kapoor
Sep 10, 2025 ⋅ 10 min read
ai dev tool power rankings

AI dev tool power rankings & comparison [Sept 2025]

Compare the top AI development tools and models of September 2025. View updated rankings, feature breakdowns, and find the best fit for you.

Chizaram Ken
Sep 10, 2025 ⋅ 9 min read
file based routing in react router

File-based routing in React Router v7 – Why keep it optional?

Explore the new mode that introduced file-based routing in v7, why it remains optional, and when to use it or stick with a different approach.

Elijah Asaolu
Sep 9, 2025 ⋅ 6 min read
View all posts

2 Replies to "Testing Node serverless applications — AWS Lambda functions"

  1. I’m really happy I found your post, as testing in serverless is not a much talked about topic! I’m not sure if you’re following it on purpose, but the pattern you’re proposing is really close to Clean Architecture. One thing that I have done recently to extremely simply writing tests is to abstract out the “interfaces” such as s3, sqs, etc from the business logic. I wrote a wrapper for each interface that presents an api to the business logic, and use an application context factory to inject the interface dependencies. That way, you can test the wrapper, and your business logic – but you can completely fake your interfaces with a test application context. No need to instantiate AWS() in your tests that way.

  2. Thanks Chris!
    Yes, this pattern is quite similar to the Clean Architecture, with the accent on decoupling components (I/O etc) from the core logic.

Leave a Reply