|
There is often the sense that going serverless means going microservices and event-driven architectures, too. That's NOT TRUE! They are related but ultimately separate design choices. So much of software engineering is about making smart choices. Often, when I see teams struggle to adopt serverless, it's because they try to take on too many new ideas at once. A marathon, not a sprintI have seen many ambitious teams that want to modernise their application and go from on-premise monoliths to:
On top of that, migrating to DynamoDB is often thrown into the mix. That is A LOT of moving parts, and it requires many different experiences and expertise to navigate successfully. Expertise that most of these teams do not have. Learning to do all this while you're expected to deliver tangible results under a looming deadline is very risky. It's like trying to learn to juggle flaming swords and ride a unicycle at the same time... while you're on a tightrope! A more prudent approach is to take a slow and steady path towards your goal. Limit the scope of change Limit the number of big (and risky!) architectural changes in one go. One is best; two is plenty, and three is probably too much. If you're switching compute (e.g. EC2 -> Lambda) and database (e.g. MySQL -> DynamoDB) paradigms, then don't add microservices or event-drivenness to the mix. De-risk along the way Look for opportunities to de-risk, such as running your existing web application as a Lambdalith. Tools like Lambda Web Adapter, Serverless Express and Chalice all support this pattern. That way, you can enjoy the benefits of Lambda (e.g. scalability) without refactoring your entire application and adopting a new set of software development practices. Start small If your team is new to AWS and the serviceful mindset (i.e. prefer using a managed service over custom code), then start by introducing a low-risk service to your stack. Changing a database requires a lot of work. Moving to Lambda impacts CI/CD and development workflow. So maybe you can start by introducing S3 for blob storage. Or perhaps replace a custom-built scheduling service with EventBridge Scheduler. It's not about being "serverless"Instead of thinking about "adopting serverless", it's better to focus on reaping the benefits of serverless with the least effort:
Serverless-First, not Serverless-OnlyWe say "serverless-first" because we want people to leverage serverless technologies where it makes sense. Your business changes over time, and as your context changes, you should adapt accordingly. As I discussed in my retrospective of the PrimeVideo article, your architecture should evolve with your business needs. Being serverless is not the point. It's not a religion. For me, the best thing about serverless technologies is that they help me deliver customer value faster. Like that time when I helped a client launch a new social network in weeks. When it comes to adopting serverless technologies in your organization, you too, should focus on finding value. If a move is risky, then find ways to de-risk and take smaller steps instead. |
Join 17K readers and level up you AWS game with just 5 mins a week.
AI agents can now scan an entire open-source codebase for exploitable vulnerabilities in hours. Frontier models carry the complete library of known bug classes in their weights. So you can simply point an AI agent at a codebase and tell it to find zero-days. This isn't theoretical. Willy Tarreau, the HAProxy lead developer, reports that security bug reports have jumped from 2–3 per week to 5–10 per day. Greg Kroah-Hartman, the Linux kernel maintainer, described what happened: "Months ago, we...
Lambda Durable Functions makes it easy to implement business workflows using plain Lambda functions. Besides the intended use cases, they also let us implement ETL jobs without needing recursions or Step Functions. Many long-running ETL jobs have a time-consuming, sequential steps that cannot be easily parallelised. For example: Fetching data from shared databases/APIs with throughput limits. When data needs to be processed sequentially. Historically, Lambda was not a good fit for these...
Step Functions is often used to poll long-running processes, e.g. when starting a new data migration task with Amazon Database Migration. There's usually a Wait -> Poll -> Choice loop that runs until the task is complete (or failed), like the one below. Polling is inefficient and can add unnecessary cost as standard workflows are charged based on the number of state transitions. There is an event-driven alternative to this approach. Here's the high level approach: To start the data migration,...