Hi team, im trying to reconcile my infracost ecs c...
# help
d
Hi team, im trying to reconcile my infracost ecs cost and usage with AWS' cost and usage explorer. Im finding that AWS is reporting almost double infracost. Is it because the actual usage isnt being taken into account? I dont know how / where to add monthly gb and vcpu hours and of usage into my infracost-usage.yml file (am using the large defaults provided by infracost) AWS cost and usage metrics used for the month of January: USE2-Fargate-vCPU-Hours:perCPU costs $x USE2-Fargate-vCPU-Hours:perCPU usage (5917 hours) USE2-Fargate-GB-Hours costs are $y USE2-Fargate-GB-Hours usage are (11,834 hours) Infracost cost and usage: Per GB per hour $x / 2 Per vCPU per hour $y / 2 The Infracost output makes no reference to hours usage, so i can only assume its based on a default value (that isnt present in the infracost-usage.yml file). Any help much appreciated. TIA
w
@damp-vase-72566 by default infracost assumes 730hrs (i.e. full month) and indeed the over-estimation is probably because the actual usage isn’t taken into account
d
Hi Ali, ive spent a while understanding how ecs tasks are costed and im in a better position to ask a more detailed question. When the ecs costs are calculated they are done so against the desired task count associated with the auto scaling group. However this is a flat figure and doesnt take into account the actual autoscaling and rise and fall of the task count over the month. What is infracosts take on the average ecs task running count and if its achievable, how would it work? Im leaning towards calling the AWS APIs to get an average task count and then use that as the desired count to get a more usage based cost estimate for ECS. The is only for services that have been running for more than a month, where other services should use the desired count. Thank you
w
Hey Chris, our thinking is similar to yours where we’d take the last 30day avg from the AWS APIs and use that. We’d like to build a better developer experience of that in Infracost Cloud as that’s the hosted service that could make AWS API calls regularly to get the usage data and automatically apply that in PR comments, vs you having to fetch usage data in CI/CD (which can be slow as it’ll require caching), and push files to repos using grep/sed 😄 I’ll DM you some details about a private-beta we’re running incase you’re interested.
d
Thank you Ali, I’ll have a read about the private beta and get back to you. Thanks for the info