October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk5 min

Running a Multi-Tenant Platform on EC2: Node.js, PostgreSQL, SES—and the AWS Cost Bug We Almost Missed

A practical guide to tenant isolation, PostgreSQL sharing, AWS cost-spike investigation and SES sending limits for a multi-tenant EC2 platform.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A multi-tenant Node.js service on EC2 can share PostgreSQL and Amazon SES across customers, but the lower infrastructure bill comes with two obligations: enforce tenant boundaries deliberately and trace AWS charges below the service-chart level. One cost mechanism worth checking is EC2-to-RDS traffic crossing Availability Zones. It is only a possible explanation for the near-missed bill issue here: without the invoice line, Region, architecture details and incident evidence, its cause cannot be established.

What a multi-tenant EC2 design has to balance

In a multi-tenant platform, multiple customers use the same application service, while their data and activity still need appropriate separation. Sharing compute and database resources can improve operating efficiency and reduce the number of resources to manage. But sharing does not make tenants isolated by itself. AWS describes tenant isolation as fundamental to multi-tenant SaaS design; it has to be a property of the architecture and access controls.

As an Amazon Associate I earn from qualifying purchases.

A Node.js application on EC2, PostgreSQL, and SES are components, not a complete architecture description. The actual isolation boundary depends on how the application, database and tenant-specific operations are configured. AWS guidance commonly groups database and application arrangements into three patterns:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Pattern Resource arrangement Isolation boundary Cost and operations trade-off
Silo Dedicated application stack and RDS database instance per tenant Separate tenant stack and database Strongest separation of these patterns, with the most resources and operational overhead
Bridge Shared application stack and RDS instance, with a dedicated schema per tenant Tenant-specific database schema Shares infrastructure while retaining schema-level separation; access controls and schema management remain important
Pool Shared application stack, database instance and database objects; tenant rows share tables Tenant-level row separation Lowest-cost pattern in AWS’s comparison, but isolation depends on correct row-level enforcement and application behavior

These are design patterns, not a rule that every customer must use the same one. A hybrid approach can isolate tenants with unusually high traffic or risk while pooling others. The decision should account for isolation, performance and noisy-neighbor risk, cost, and the work involved in operating, migrating and maintaining the system. AWS’s April 2024 managed PostgreSQL guidance discusses SaaS partitioning choices for Aurora PostgreSQL-Compatible and Amazon RDS for PostgreSQL.

For a shared PostgreSQL database

In a pooled design, tenant identity must remain attached to each relevant operation: the application needs to select and constrain the right tenant’s records, and the database access pattern must not rely on a tenant identifier supplied by an untrusted client as proof of authorization. A schema-per-tenant bridge changes the boundary but does not remove the need to restrict access. The appropriate controls depend on the implementation; the stack name alone does not establish which pattern or safeguards are in use.

Why an AWS bill can surprise you

The near-missed cost issue is not identifiable from the information available: there is no bill line, Cost and Usage Report, incident date, Region, traffic volume or configuration establishing what caused it. Cross-Availability-Zone database traffic is a concrete possibility to investigate, not a confirmed diagnosis.

Check EC2-to-RDS placement

AWS says EC2-to-RDS data transfer across Availability Zones within the same Region can incur standard EC2 regional data-transfer charges. The RDS pricing page lists transfer within the same Availability Zone as free. Whether this matters depends on the Region, resource placement and amount of traffic; check the applicable current pricing rather than assuming a fixed cost. If application instances and the database are in different AZs, compare the traffic and charge details before changing placement, since availability and resilience are also architectural concerns.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Look beyond the headline service chart

Cost Explorer associates data-transfer costs with the related AWS service rather than necessarily presenting a separate top-level transfer service. A high-level service view can therefore hide the usage type or placement that explains a change. Tags are useful for allocation, but they are not a complete ledger: unsupported or untagged resources and some subscription or one-time fees may remain unallocated in tag reports.

Other resources can contribute to unexpected spend, including EBS volumes and snapshots, Elastic IP addresses, storage, network use and resources in Regions that are easy to overlook. Some infrastructure belongs to a higher-level managed service. If that is the case, manage or remove it through the service that created it; deleting underlying resources directly can lead that service to recreate them.

A practical cost-spike investigation

  1. Start with the bill and Cost Explorer. Review the Bills page, then use Cost Explorer to group or filter charges by service, Region, usage type, Availability Zone and account where relevant. For a transfer hypothesis, look for the usage detail associated with EC2 or RDS rather than expecting a distinct data-transfer service row.
  2. Compare the charge to the architecture. Check where EC2 instances and the database ran during the affected period, including AZ placement, and compare those details with traffic and the relevant usage line. Do not label a charge as cross-AZ transfer unless the billing and configuration evidence support it.
  3. Inspect ancillary resources and Regions. Review storage, EBS volumes and snapshots, Elastic IP addresses, and other resources that may have continued running or been created in a less-used Region. For resources managed by another AWS service, use that service’s controls.
  4. Use tags as one lens, not the final answer. Apply consistent cost allocation tags to supported resources and use tag reports to identify attributable spend. Investigate unallocated charges separately; absence of a tag allocation does not mean the charge is absent.
  5. Allow for billing-data delay. Current-month Cost Explorer data may take about 24 hours to prepare and can be updated later. Check the period and data freshness before treating an apparent gap as proof that a cost did not occur.

Without the original charge detail, the defensible conclusion is a shortlist of checks, not a root cause. A useful incident record would retain the line item and usage type, account and Region, affected dates, relevant resource placement, and the evidence used to connect the two.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How to get earlier warning of a repeat

Budgets notify; they do not inherently cap spend

AWS Budgets can alert on configured actual-spend or forecast thresholds. Set thresholds that match the account’s operating expectations and route notifications to a channel someone monitors. An alert is a detection and notification mechanism, not an automatic spending limit unless Budget Actions have separately been configured to take an action.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Anomaly detection can help narrow the search

AWS Cost Anomaly Detection can help rank unusual spend and show likely impact by service, account, Region or usage type. It runs around three times daily after billing data is processed, and AWS says detection can take up to 24 hours because the feature relies on Cost Explorer data. Treat it as a way to focus investigation, not as an immediate safeguard against all unexpected charges.

SES limits are regional and account-specific

Amazon SES sending quotas are associated with an AWS account and Region. AWS documentation states that sandbox accounts default to 200 messages per 24 hours and a sending rate of one message per second. Outside the sandbox, limits depend on the account’s use case, and limits may be adjustable. These values can change, so check the current quota for the deployment Region before relying on them.

For a multi-tenant service, the account-level SES quota is not the same as an individual tenant’s allowance. The system’s tenant authorization, rate limiting, bounce and complaint handling, and tenant-level attribution depend on implementation details; the use of SES alone does not establish how those controls work.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.