You can become a serverless blackbelt. Enrol to my 4-week online workshop Production-Ready Serverless and gain hands-on experience building something from scratch using serverless technologies. At the end of the workshop, you should have a broader view of the challenges you will face as your serverless architecture matures and expands. You should also have a firm grasp on when serverless is a good fit for your system as well as common pitfalls you need to avoid. Sign up now and get 15% discount with the code yanprs15!
Hi, welcome to the first weekly update of 2020!
First of all, I want to give a shout out to my Patreon supporters:
Andre Silva, Boseok In, Ebru Cucen, Hrafnkell Palsson, Joe Kearney, Jon Barber, Jonathan Kosgei, Luis Gutierrez, Marko @ Serverless Life, Sal DiStefano, Shawn MacIntyre, Will Saunders, Yinan Xue
Thank you guys so much for your continued support!
Year in review, 2019. Here’s a quick look at my 2019 in terms of things I did and their reach. In short, I produced a lot of content – blog posts, talks, podcasts, webinars and open-source projects. If you’re interested, you can find all of my serverless content from 2019 in one place here.
Amazon Builders’ Library in Focus
The Amazon Builders’ Library was arguably the most exciting announcement at re:invent 2019. Many of you expressed an interest in my reading notes which boils down each article to the most insightful and actionable points. So I’m kicking off a new series of blog posts over on the Lumigo blog to share my notes with you all.
I'm making my own notes as I'm going through the AWS builders library articles, would people be interested in these? They're significantly shorter (1 pager instead of 20), but assume you are familiar with the problem domain and lingo already. #aws #reinvent
— Yan Cui (@theburningmonk) December 6, 2019
The first two posts have dropped and cover the area of building resilient systems using techniques such as load shedding and best practices around handling timeouts and retries. These articles are not written with serverless in mind, but some of the advice is still applicable for serverless applications.
I’m doing a couple of talks this month.
On Thursday, 9th Jan I’m sharing with the AWS user group in Amsterdam the common mistakes companies make when they first transition to serverless.
And finally, I’m doing a new talk on the essential open source tools for serverless developers at the AWS Community Day Nordics in Stockholm on Jan 31st. It’s a free event, and you can register for it here.
AWS certified (again)
On a personal front, I passed my AWS certification for security specialty with a score of 901/1000 :-D My previous certifications had expired late 2019, and with AWS IQ hopefully hitting the European shores later this year I thought it a good time to recertify.
A few of you have asked how long I had to study and what (if any) resources did I use.
I spent 4 days in preparation, studying around 2-4 hours per day. As some of you know, I have run production workloads on AWS for 10 years so I have a lot of hands-on experience to fall back on. However, I still found A Cloud Guru’s certification course quite useful as both a reference handbook, directing me towards the important area to focus on. It also helped me brush up on a few services and updates which I had missed over the years, or never had to work with – e.g. CloudHSM. If you’re also taking the security specialty test then make sure you know KMS like the back of your hand, it accounted for about 30% of my test questions!
The certification page itself has some example questions, which you can download for free. You can also pay $40 to take a mock test online. A Cloud Guru also has an exam simulator which gives you a full bank of mock test questions. They are a good approximation to the kind of questions you get in the real thing, but I found the exam questions to be slightly more ambiguous because important contexts/assumptions are often omitted. When in doubt, use the process of elimination to help you narrow down the choices.
Complete Guide to Step Functions
I have updated my Step Functions course to include the latest updates from re:invent 2019:
- Express Workflows
- Dynamic parallelism with the Map state
And I’m also running a 50% off sale until 10th January. Get the course here.
I added new commands to lumigo-cli to help you work with EventBridge and CloudWatch Events more easily. With these new commands, you can tail an EventBridge rule or bus to see what events are captured by the rule/bus in realtime. e.g.
- lumigo-cli tail-eventbridge-rule –region us-east-1 –ruleName my-rule
- lumigo-cli tail-eventbridge-bus –region us-east-1 –eventBusName my-bus
I also recorded a quick video to show these commands in action:
If you work with EventBridge or CloudWatch Events regularly then you’re gonna want to check it out!
On the other hand, for ANYONE who’s using AWS and find it a pain to switch between named profiles, I also updated the whoami and switch-profile commands to support assumed roles (normally configured in your .aws/config).
You can run lumigo-cli switch-profile to switch to another named profile in either the shard credential file (.aws/credential) or the config file (.aws/config). Switching to a named profile would override the default profile in the shared credential file. You can then use lumigo-cli whoami to see which profile you’re currently logged in as.
Following the theme of supporting EventBridge and CloudWatch Events, the dazn-lambda-powertools now allows you to auto-propagate correlation IDs through both EventBridge and CloudWatch Events!
To make it work, install @dazn/lambda-powertools-pattern-basic and wrap your function handler.
Amongst other things, this wrapper applies the correlation IDs middleware which automatically extracts correlation IDs from the invocation event and stores them. Whenever you use the dazn-lambda-powertools-logger, the captured correlation IDs would be automatically added to the JSON log message. This way, you don’t need to manually extract correlation IDs from invocation events and always remember to include them in your log messages. Just use our packages and correlation IDs would flow through your functions automatically!
Equally, when you use the EventBridge client or CloudWatch Events client to publish events – they are direct replacements for the corresponding AWS SDK clients – then the captured correlation IDs are automatically included in the outgoing events. The functions that process these events would then be able to extract them (via the wrapper) and automatically add them to their logs, and forward them on. So on and so forth.
Here’s a short demo of how the whole thing fits together:
A lot of recent updates to share here:
- support the new Express Workflows (v2.13.0)
- one IAM role per state machine (v2.14.0) – better security (least privilege principle) and resolves the issue of circular dependencies when creating nested workflows
- EventBridge trigger (v2.15.0)
- support serverless.js (v2.16.0)
- support custom response headers and response template (v2.17.0)
Finally, a quick shout out to Luciano for pushing middy 1.0.0 into beta! This is a long-awaited release which gives us individual packages to help keep the middy core as small as possible and helping everyone reduce their cold start time.
?Middy 1.0.0 is now in BETA!?
This new version supports Node.js 10 & 12 and a fully modular system with decoupled packages.
Check it out: https://t.co/xQiA06LvpP
— Luciano Mammino (@loige) January 5, 2020
Hi, I’m Yan. I’m an AWS Serverless Hero and I help companies go faster for less by adopting serverless technologies successfully.
Are you struggling with serverless or need guidance on best practices? Do you want someone to review your architecture and help you avoid costly mistakes down the line? Whatever the case, I’m here to help.
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”.
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!
Here is a complete list of all my posts on serverless and AWS Lambda. In the meantime, here are a few of my most popular blog posts.
- All you need to know about caching for serverless applications
- Choreography vs Orchestration in the land of serverless
- Are Lambda-to-Lambda calls really so bad?
- Lambda optimization tip – enable HTTP keep-alive
- You are wrong about serverless and vendor lock-in
- You are thinking about serverless costs all wrong
- Check-list for going live with API Gateway and Lambda
- How to choose the right API Gateway auth method
- AWS Lambda – should you have few monolithic functions or many single-purposed functions?
- Guys, we’re doing pagination wrong
- Top 10 Serverless framework best practices
- I left full-time employment, here’s what happened since
- How to break the “senior engineer” career ceiling
- My advice to junior developers