Share via

Unexpected Azure Bill Increase (₹30k → ₹5.16L) Due to Azure Functions Behind Static Web App – Seeking Root Cause Validation and Billing Guidance

Sanjay Vitkare 0 Reputation points
2026-06-09T12:06:19.68+00:00

Hello Microsoft Team,

We are a company using Azure for our production SaaS platform.

We recently received an Azure invoice of INR 5,16,480.53 for May 2026. Our previous month's invoice was approximately INR 30,000, so this represents a very significant and unexpected increase.

After investigating Cost Analysis, we found that:

  • April Compute Charges: INR 13,732.89

May Compute Charges: INR 4,04,076.75

The increase is almost entirely attributable to the Compute category.

Cost Analysis points to our Azure Static Web App resource:

oneclarity-frontend-prod

The primary meter appears as:

  **Functions → Standard Execution Time**
```This led us to investigate our Static Web App configuration and deployment setup.

### Deployment Configuration

Our GitHub Actions workflow contained:


```yaml
api_location: "api"

As we understand it, this causes Azure Static Web Apps to deploy the local api/ directory as managed Azure Functions.

Our repository contains:

api/share-blog/function.json
api/writing/function.json

Both are HTTP-triggered Azure Functions.

Static Web App Route Configuration

We also had route rewrites similar to:

{
  "route": "/writing/*",
  "rewrite": "/api/writing/*"
}

and

{
  "route": "/share/blog/*",
  "rewrite": "/api/share/blog/*"
}

As a result:

Requests to /writing/*

Requests to /share/blog/*

were being rewritten to Azure Functions endpoints.

Our Understanding

Our current assumption is:

Azure Static Web Apps automatically deployed the api/ folder as managed Azure Functions.

Every request to the above routes triggered Azure Functions execution.

Search engine crawlers, social preview bots, automated scanners, and public traffic may have repeatedly invoked these endpoints.

Azure billed these executions under:

Functions → Standard Execution Time

This generated the unexpected Compute charges visible on our May invoice.

Planned Fix

We have prepared the following changes:

Change:

api_location: "api"

to

api_location: ""

Remove route rewrites from:

/writing/* → /api/writing/*
/share/blog/* → /api/share/blog/*

Allow those routes to be handled directly by the React SPA instead of Azure Functions.

Questions

Does our root-cause analysis appear technically correct?

Can Azure Static Web Apps managed Azure Functions generate significant Compute charges through repeated public HTTP requests, crawler traffic, or bot traffic?

Is Functions → Standard Execution Time the expected billing meter for this scenario?

Once the above deployment changes are applied, should the execution-time charges stop entirely?

Has Microsoft previously provided billing credits or goodwill adjustments in situations where Azure Functions were unintentionally deployed and consumed unexpectedly due to configuration misunderstandings?

We have already identified and corrected the issue on our side and are primarily looking for confirmation of the technical root cause and guidance regarding possible billing review options.

Thank you for your assistance.Title: Unexpected Azure Bill Increase (₹30k → ₹5.16L) Due to Azure Functions Behind Static Web App – Seeking Root Cause Validation and Billing Guidance

Azure Static Web Apps
Azure Static Web Apps

An Azure service that provides streamlined full-stack web app development.


2 answers

Sort by: Most helpful
  1. AI answer

    2026-06-09T12:07:25.0166667+00:00

    The technical behavior described is consistent with how Azure bills execution-based services, but the provided context does not explicitly cover Static Web Apps–hosted Functions or their exact meters. Only the following billing-related points are supported by the context:

    1. Execution-based meters can drive large cost spikes
      The context shows that:
    • Azure Functions on consumption plans are billed based on execution counts and execution time, using metrics such as Function Execution Count and Execution Units that map to execution-time meters.
    • Invoices and Cost Analysis expose these meters as part of the Compute category and allow drilling down to the meter level.

    From the Functions billing documentation:

    • Metrics like OnDemandFunctionExecutionUnits and AlwaysReadyFunctionExecutionUnits are converted into GB-seconds and billed as execution time.
    • These metrics are directly tied to the Execution Time meters for Functions.

    This supports that a high volume of function executions (for example, from HTTP-triggered endpoints) can generate significant compute charges under a Functions execution-time meter.

    1. Cost analysis is the correct way to validate which service and meter caused the spike
      The context describes how to:
    • Use Cost analysis to identify which services and meters caused unexpected cost increases.
    • Group by Meter category and drill into specific services (for example, Log Analytics, Azure Grafana, Microsoft Sentinel) to see which meter drove the spike.

    Applied to this scenario, the supported guidance is:

    • Use Cost analysis on the subscription and filter to the Static Web App resource.
    • Group by Meter category and then by Meter to confirm that the Functions → Standard Execution Time meter is responsible for the spike.
    1. Unexpected or anomalous charges should be investigated with Cost Management tools and then escalated to support
      The context provides a general process for unexpected charges:
    • Review the invoice and correlate it with Cost analysis.
    • Identify the specific services and meters causing the spike.
    • If the cause is still unclear or if there is a billing dispute, create an Azure support request for billing.

    The context also notes:

    • Azure does not log all user actions; billing is based on resource usage. If logging wasn’t enabled at the time of the spike, it might not be possible to reconstruct the exact traffic pattern.
    • When unexpected costs are identified and cannot be fully explained or controlled via configuration alone, the next step is to open a billing/support case.
    1. Billing disputes, retroactive adjustments, and credits must be handled by Azure Support
      The context includes multiple Q&A examples where:
    • Users experienced unexpected or retroactive billing increases.
    • Moderators consistently directed them to create billing support requests via the Azure portal.
    • Billing support is explicitly stated as free, and support engineers can review and address billing disputes.

    From these examples, the supported guidance is:

    • For any request involving credits, refunds, or goodwill adjustments (including cases where configuration misunderstandings caused unexpected usage), the only supported path is to open a Billing support request in the Azure portal.
    • Community forums and documentation cannot grant or commit to credits; only the billing support team can review the account, usage, and policies and decide on adjustments.
    1. How to proceed in this case, based on supported guidance
      Within the limits of the context, the following steps are supported:
    2. Validate the meter and service in Cost analysis
      • In the Azure portal, open Cost Management + Billing.
      • Use Cost analysis for the subscription.
      • Filter to the Static Web App resource and group by Meter category and Meter to confirm that Functions → Standard Execution Time is the primary driver of the May compute charges.
    3. Check for anomalies and confirm that the spike is limited to the period in question
      • Use daily cost views (similar to the Log Analytics example) to identify the exact dates where the spike occurred.
      • Confirm that after the configuration changes are deployed, daily costs for that meter drop or disappear.
    4. Enable or review logging/metrics for future validation
      • Ensure that appropriate logging and metrics are enabled for Functions and Static Web Apps so that future spikes can be correlated with traffic and execution patterns.
    5. Open a billing support request for review/credits
      • Create a Billing support request from the Azure portal.
      • Provide:
        • Subscription ID.
        • The Static Web App resource name.
        • The time range and invoice details (April vs. May charges).
        • Screenshots or exports from Cost analysis showing the Functions → Standard Execution Time meter as the cause.
        • A description of the configuration (routes and api_location) and the corrective changes already applied.
      • Request a review of the unexpected usage and ask whether any adjustment or credit is possible.

    The context does not state any general policy or guarantee that credits will be granted for misconfigurations, so any decision about credits or goodwill adjustments must come from the billing support team after reviewing the specific subscription and usage history.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

    1 person found this answer helpful.
  2. Sahil Kumar 0 Reputation points
    2026-06-09T12:10:14.49+00:00

    Check Azure Cost Analysis and Azure Function metrics (execution count, duration, and scaling). A sudden increase in any of these can cause a large billing spike. If the usage seems unexpected, contact Microsoft Billing Support for investigation.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.