Title
#general
a

Adam

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

Hugo (Infracost)

08/30/2022, 3:31 PM
hey adam
3:41 PM
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.
a

Adam

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

Hugo (Infracost)

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

Adam

08/30/2022, 3:42 PM
yes
Hugo (Infracost)

Hugo (Infracost)

08/30/2022, 3:42 PM
right
3:43 PM
@Adam is this what you were looking for?
a

Adam

08/30/2022, 3:43 PM
yes!
Hugo (Infracost)

Hugo (Infracost)

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

Adam

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

Hugo (Infracost)

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

Adam

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

Hugo (Infracost)

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
a

Adam

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