'Inaccessible host: `savingsplans.eu-west-1.amazonaws.com'. This service may not be available in the `eu-west-1' region

I am trying to List all available savings plan in my account using

var savingsPlans = new AWS.SavingsPlans();
const listResponse: AWS.SavingsPlans.DescribeSavingsPlansResponse = await savingsPlans.describeSavingsPlans({nextToken: token}).promise();

But getting following error. Please help.

 "error": {
        "message": "Inaccessible host: `savingsplans.eu-west-1.amazonaws.com'. This service may not be available in the `eu-west-1' region.",
        "code": "UnknownEndpoint",
        "region": "eu-west-1",
        "hostname": "savingsplans.eu-west-1.amazonaws.com",
        "retryable": true,
        "originalError": {
            "message": "getaddrinfo ENOTFOUND savingsplans.eu-west-1.amazonaws.com",
            "errno": "ENOTFOUND",
            "code": "NetworkingError",
            "syscall": "getaddrinfo",
            "hostname": "savingsplans.eu-west-1.amazonaws.com",
            "region": "eu-west-1",
            "retryable": true,
            "time": "2022-03-03T05:32:05.683Z"
        },
}
'''


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source