Weekly update 47

Yan Cui
theburningmonk.com
Published in
6 min readAug 14, 2020

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!

Skill up your serverless game with this hands-on workshop.

My 4-week Production-Ready Serverless online workshop is back!

This course takes you through building a production-ready serverless web application from testing, deployment, security, all the way through to observability. The motivation for this course is to give you hands-on experience building something with serverless technologies while giving you a broader view of the challenges you will face as the architecture matures and expands.

We will start at the basics and give you a firm introduction to Lambda and all the relevant concepts and service features (including the latest announcements in 2020). And then gradually ramping up and cover a wide array of topics such as API security, testing strategies, CI/CD, secret management, and operational best practices for monitoring and troubleshooting.

If you enrol now you can also get 15% OFF with the promo code “yanprs15”.

Enrol now and SAVE 15%.

Check out my new podcast Real-World Serverless where I talk with engineers who are building amazing things with serverless technologies and discuss the real-world use cases and challenges they face. If you’re interested in what people are actually doing with serverless and what it’s really like to be working with serverless day-to-day, then this is the podcast for you.

Check out my new course, Learn you some Lambda best practice for great good! In this course, you will learn best practices for working with AWS Lambda in terms of performance, cost, security, scalability, resilience and observability. We will also cover latest features from re:Invent 2019 such as Provisioned Concurrency and Lambda Destinations. Enrol now and start learning!

Check out my video course, Complete Guide to AWS Step Functions. In this course, we’ll cover everything you need to know to use AWS Step Functions service effectively. There is something for everyone from beginners to more advanced users looking for design patterns and best practices. Enrol now and start learning!

Originally published at https://theburningmonk.com on August 14, 2020.

--

--

Yan Cui
theburningmonk.com

AWS Serverless Hero. Follow me to learn practical tips and best practices for AWS and Serverless.