Weekly update 47

Hi, welcome to another weekly update!

Real-World Serverless podcast

Since the last update, we have 4 new episodes for you:

New blog posts

Choreography vs Orchestration in the land of serverless. In this post, I compare and contrast the two modes of interaction within a microservices architecture – orchestration and choreography. Both have strong trade-offs. And while choreography is great at building loosely-coupled systems, it distributes the business all over the place, making it harder to understand the system behaviour end-to-end. The TL;DR is that, when it comes to implementing business workflows, you should prefer orchestration within the bounded context of a microservice, but prefer choreography between bounded contexts.

Five reasons you should consider AppSync over API Gateway. API Gateway is the de facto way to build APIs using serverless technologies on AWS. However, I have really grown to like AppSync and the productivity it affords me, which (amongst other things) has allowed me to build the backend for a new social network in just a few weeks. And in post, I shared 5 reasons that you should seriously consider using AppSync and GraphQL instead for your next API.

How I scaled an AppSync project to 200+ resolvers. A common problem people run into as their AppSync API becomes more complex is that they’ll run into the 200 resources limit on CloudFormation. I worked on a client project recently where the AppSync project grew to over 200 resolvers and 600 CloudFormation resources. In this post, I discussed the evolution of my strategy for splitting this project into nested stacks so it can continue to grow as the business demands it.

AppSync: how to inject table names into DynamoDB batch & transact operations. This is yet another common problem that people run into when working with AppSync. Fortunately, the solution is fairly straight forward when you use the Serverless framework and the serverless-appsync-plugin to manage your resolvers and templates.

Debugging AWS Lambda timeouts. Timeouts are one of the trickier problems to debug with Lambda. For starters, they get swallowed up with other generic errors and you don’t get an error log message from your application, which makes them quite hard to spot. Also, it can be difficult to track down on which operation was responsible for causing your function to timeout, especially if your function has to communicate with multiple systems. In this post, I outlined several ways you can quickly detect Lambda timeouts and find the root cause.

Upcoming webinar

I’m running a free webinar on 19th August on how to debug and mitigate AWS Lambda timeouts. During the session, I will demo the techniques discussed in the aforementioned blog post, and also show you a simple technique (with just a few lines of code) that can mitigate timeouts altogether in many cases.

You can register for the session here, and I hope to see you there!

Upcoming workshop

And of course, don’t forget that my Production-Ready Serverless workshop is coming back on September 1st!

It’s still not too late to register and learn how to build production-ready serverless applications, including:

  • how to choose the right authentication method for API Gateway
  • API Gateway best practices
  • testing strategies for serverless applications
  • how to build event-driven architectures with Lambda and EventBridge
  • how to include SNS & EventBridge in end-to-end tests
  • how to handle secrets securely
  • security best practices for serverless applications
  • how to build observability into your application so you can debug problems in production
  • how to right-size memory size to get the best performance and cost
  • costly mistakes you need to watch out for and avoid in your serverless architecture

Oh, and don’t forget, as a reader for this blog you get a special 15% discount with the code yanprs15.

If you prefer a more instructor-led workshop, instead of studying by yourself, then I’m also running a 2-day, instructor-led version of the same workshop on October 8th-9th. Click here for more details and to register, and the same yanprs15 promo code is also valid for this workshop too.

AWS updates

AWS made some pretty significant announcements recently, so I want to recap a few that might interest you here.

Thank you to my patrons

Finally, I want to give a shout out to my patrons:

Andre Silva, Bala Chalasani, Boseok In, Dome Jantaphat, Dragan Cabarkapa, Ebru Cucen, Efi Merdler-Kravitz, Eric Allam, Hrafnkell Palsson, Jermaine Watkins, Jon Barber, Jonathan Kosgei, Jürgen Wagner, Kevin Woods, Marko @ Serverless Life, Michael J Lyons, Michael Wills, Peter Miller, Shawn MacIntyre, Tajinder Singh, Tendies123, Will Saunders, Yinan Xue

Thank you guys so much for your continued support!

 

Learn to build Production-Ready Serverless applications

Want to learn how to build Serverless applications and follow best practices? Subscribe to my newsletter and join over 3,000 AWS & Serverless enthusiasts who have signed up already.
As a BONUS, you will receive early access and discount for my new AppSync course.