Nat Gateway always running and thereby incurring costs

Alex H 6 Reputation points
2022-12-05T11:19:44.89+00:00

I have a setup where I have Azure functions running on a timer-trigger, and using a nat-gateway with a static public ip in order to access an ip-restricted API. These functions run once per day, and at all other times the nat gateway is not used. The problem is with the NAT-Gateway never going to standby during the time that it is not used. Thereby incurring costs for a full day of use, every day. Looking at the activity graph for the NAT-gateway I noticed that the activity never reaches 0, but always slightly above 0, with little fluctuations. I have TCP timeout set to 4 minutes.

My question is, how can I prevent this permanent activity on the NAT-Gateway from happening so that it the standby-mode can be triggered? Or is there a way to force it into standby during the hours that it is not used?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,937 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,977 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MughundhanRaveendran-MSFT 12,506 Reputation points
    2022-12-07T06:09:20.14+00:00

    @Alex H ,

    Unfortunately, it is not possible to disable NAT gateway. We can only delete or remove the NAT gateway.

    https://learn.microsoft.com/en-us/azure/virtual-network/nat-gateway/manage-nat-gateway?tabs=manage-nat-portal

    Apologies for the inconvenience caused.

    1 person found this answer helpful.

Your answer

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