https://infracost.io logo
#general
Title
# general
n

nutritious-musician-34507

08/30/2022, 3:27 PM
Is there a recommendation for how to calculate aws ingress pricing based on usage?
m

mysterious-teacher-68276

08/30/2022, 3:31 PM
hey adam
so we have the ability to fetch from cloudwatch, however this doesn’t cover generic data transfer costs. I think the best thing to look at the cost explorer and try and drill down into the “data transfer” usage type group. I’ve used this article in the past as a decent guide to trying to debug data transfer costs. Then once you have a decent idea of the thresholds, just add it into the usage Infracost usage manually. Or you could set up a github action/scheduled job to try and fetch these values on a schedule. e.g. https://aws.amazon.com/premiumsupport/knowledge-center/cloudwatch-getmetricdata-api/ I know this isn’t ideal atm, but we have expanded fetch metrics from cloud on our roadmap. It’s something we’re passionate about making a better experience for users.
n

nutritious-musician-34507

08/30/2022, 3:41 PM
i think i’m asking: where do i put the egress usage?
m

mysterious-teacher-68276

08/30/2022, 3:41 PM
as in which yaml key in the infracost usage file?
n

nutritious-musician-34507

08/30/2022, 3:42 PM
yes
m

mysterious-teacher-68276

08/30/2022, 3:42 PM
right
@nutritious-musician-34507 is this what you were looking for?
n

nutritious-musician-34507

08/30/2022, 3:43 PM
yes!
m

mysterious-teacher-68276

08/30/2022, 3:43 PM
awesome, glad to help
n

nutritious-musician-34507

08/30/2022, 3:43 PM
this isn’t based on terraform, right?
this is just a usage convention invented by infracost?
m

mysterious-teacher-68276

08/30/2022, 3:43 PM
yup correct
n

nutritious-musician-34507

08/30/2022, 4:05 PM
is there a way to get infracost to output these as cost components without a usage.yml?
m

mysterious-teacher-68276

08/30/2022, 4:50 PM
Not currently no, I believe you might be interested in following this issue for updates: https://github.com/infracost/infracost/issues/1525
n

nutritious-musician-34507

08/30/2022, 4:52 PM
yes, that looks promising
2 Views