Skip to main content
CloudServerlessCost Optimization

Cloud cost optimization: serverless architecture for growing companies in Colombia

Andres Betancourt7 min read

Cloud infrastructure (AWS, Azure, Google Cloud) is billed globally in US dollars. For growing companies and startups in Colombia and Latin America, local currency devaluation and fluctuation is a significant financial challenge for sustaining fixed costs on servers and databases running 24/7.

Why serverless is a good fit for a regional budget

Serverless architecture shifts the paradigm from 'pay for a reserved server' to 'pay for actual use'. If your system doesn't process requests overnight or has sporadic spikes during the day, Lambda functions or Cloud Functions bring billing down to zero when there's no demand, scaling instantly and automatically when traffic spikes hit (a tax-free sales day, a promotional campaign).

The real limits of serverless — so we don't sell it as a silver bullet

Serverless isn't the right answer for everything, and it's worth saying that as clearly as its advantages get explained. It has two well-known technical limitations worth evaluating before migrating: 'cold start' (the first invocation of a function after a period of inactivity takes longer because the execution environment has to initialize from scratch, which can be a problem for endpoints where latency is critical) and a different flavor of vendor lock-in — function code tends to get tied to cloud-provider-specific conventions, which makes switching providers more expensive compared to a traditional containerized application. For a workload with constant, predictable 24-hour traffic, a well-sized reserved server can end up cheaper than paying per invocation — serverless shines specifically with irregular traffic, not steady load. Mitigating cold start usually requires 'warming' the most latency-sensitive functions with scheduled maintenance invocations, an extra operational layer that also needs to be budgeted for.

Key steps to cut infrastructure costs

  • Move asynchronous tasks and image processing to pay-per-execution serverless functions.
  • Implement on-demand scaling databases to avoid overprovisioning.
  • Configure strict lifecycle policies on storage buckets (S3) to move historical files to lower-cost storage tiers (Glacier).
  • Monitor consumption spikes with FinOps tooling to catch loops or inefficient database queries.

It's worth going into detail on the first of these steps, because it's the one that cuts the bill fastest without touching the user experience: any task that doesn't need an immediate response (processing an image a user uploaded, generating a report, sending a confirmation email) is a natural candidate to move to an event-triggered serverless function instead of running inside the same server handling real-time web requests. This doesn't just cut compute cost — it also frees the main server from work that doesn't need to be there, improving the latency of the rest of the application as a side effect.

AWS Lambda, Azure Functions, and Google Cloud Functions: differences that matter

The three main providers solve the same problem with nuances that do affect a real architecture decision. AWS Lambda has the most mature ecosystem and the deepest integration with the rest of AWS's services (queues, databases, storage), making it the reasonable default if the rest of the infrastructure already lives there. Azure Functions tends to be the natural choice when the organization already operates within the Microsoft ecosystem (Active Directory, SQL Server, .NET), because integration friction is lower. Google Cloud Functions tends to stand out for workloads that benefit from Google Cloud's data and AI infrastructure. For most growing companies in Colombia, the decision ends up depending more on where the rest of the infrastructure already lives than on a decisive technical difference between the three — migrating an entire cloud just to access serverless functions rarely justifies itself alone.

Observability in serverless architectures: a different kind of challenge

Debugging a problem in a serverless architecture is fundamentally different from debugging a traditional server, and underestimating that difference is a common cause of incidents that take longer than necessary to resolve. There's no single server to SSH into and check logs — execution is distributed across multiple short-lived invocations, each with its own brief lifecycle. This makes a correlation ID per request (the same structured-logging concept that applies to any backend, see our article on REST API architecture) even more critical here than on a traditional server: without it, reconstructing what happened across a chain of functions that called each other is practically impossible once each ephemeral instance has already finished and disappeared.

A well-monitored serverless architecture needs, at minimum, three pieces: centralized logs from all functions in one queryable place (not scattered across each provider's console), duration and error-rate metrics per individual function to pinpoint exactly which one is failing inside a longer chain, and alerts configured against concrete thresholds — not manually checking every day whether something looks off. Without that minimum observability baseline, the operational advantage of not maintaining servers gets traded for the disadvantage of not knowing what's happening inside the system when something breaks.

Cases where it's not worth migrating yet

Besides the constant-traffic case mentioned above, there are two other scenarios where it's worth waiting before migrating to serverless: processes that need to keep state in memory between requests (certain machine-learning workloads that load a heavy model and reuse it, for example), where the cost of reloading that state on every cold invocation can wipe out the savings; and systems with very strict, constant latency requirements (high-frequency financial trading, for instance), where even a low probability of a cold start is unacceptable. Outside those specific cases, most typical business applications — e-commerce, B2B SaaS, internal systems — do benefit from moving at least part of their workload to serverless.

How to calculate whether serverless actually saves money, before migrating

Before moving an entire workload, it's worth estimating the real traffic profile: if the system receives requests at a reasonably even pace throughout the day (an internal system used during office hours, with similar load hour to hour, for example), a well-sized traditional server is probably cheaper than paying per invocation. If traffic is unpredictable — sharp spikes followed by long stretches of near-zero activity, as is common with e-commerce or marketing campaigns — serverless almost always wins, because the cost of keeping a server running 'just in case' during off-peak hours is exactly the waste this model eliminates.

A hybrid strategy, which many growing companies end up adopting without planning it that way from the start, is to keep a traditional server for the system's baseline, predictable load (the traffic that really is constant), and move specifically the asynchronous tasks, seasonal spikes, and event-triggered processes to serverless functions. This avoids both the waste of over-provisioning a server for the worst case of the year, and the latency cost of cold starts on the routes where an immediate response really matters.

The other factor rarely calculated when comparing costs is operational: a traditional server needs security patches, operating system updates, and capacity monitoring — recurring human work that also has a cost, even if it doesn't show up on the same line as the infrastructure bill. Serverless shifts that responsibility to the cloud provider, which for a small engineering team (typical of a growing company) can represent bigger savings than the billing difference between the two models — engineering time freed up to build product instead of maintaining servers.

For a company just starting to evaluate this transition, the most reasonable starting point isn't migrating everything at once, but picking a single low-risk asynchronous workflow — image processing for user uploads tends to be a good initial candidate — and measuring the real savings over one or two full billing cycles before deciding how far to extend the strategy to the rest of the system. That validation with your own data, instead of generic projections from a cloud provider, is what separates a well-grounded serverless migration from a decision made just because it's trendy at the moment.

Adopting a structured serverless strategy, applied where it genuinely makes sense rather than as an automatic full migration, lets organizations optimize their regional operating budget and scale their software infrastructure without compromising stability during unexpected traffic spikes.

Back to blog