Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

117
Vistas
AWS monthly billing service charges nodejs

I am trying to get the monthly billing data for an AWS production account through a nodejs script.

const getbillingReport = () => {


        getcreds({ accountId: '1234554321', region:'us-east-1'})
        .then(accCreds => {
        costexplorer = new AWS.CostExplorer(accCreds);

        var params = {
        Metrics: [ 
        'BlendedCost',
        ],
        TimePeriod: { 
            End:'2022-02-28',
            Start: '2022-02-01',
        },
        Granularity: 'MONTHLY',
        
        };

        costexplorer.getCostAndUsage(params, function(err, data) {
            if (err) console.log(err, err.stack);
            else     console.log(JSON.stringify(data));    


        })
    });

The amount that I get by running the query is different from the actual Amazon Web Services, Service Charges that I see when I navigate to the Billing Dashboard --> Bills and choose a month(February 2022). Could someone guide me on the changes I should make on the query to get the exact amount that I see in the billing dashboard

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

The aws documentation states that the End in TimePeriod is exclusive in nature. So I had to modify the params list to be March 1st so that the billing information for 28 Feb is also included. i.e. TimePeriod: { End:'2022-03-01', Start: '2022-02-01', },

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda