{"id":21649510,"url":"https://github.com/meap/lambda-costs","last_synced_at":"2026-05-03T22:33:06.951Z","repository":{"id":264132044,"uuid":"892458671","full_name":"meap/lambda-costs","owner":"meap","description":"Use metrics to provide a cost estimate for each Lambda function","archived":false,"fork":false,"pushed_at":"2024-11-22T06:52:27.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-19T20:35:13.007Z","etag":null,"topics":["aws","aws-lambda","costs-optimization","finops","lambda"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meap.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-22T06:36:23.000Z","updated_at":"2024-11-22T06:52:31.000Z","dependencies_parsed_at":"2024-11-22T07:39:53.208Z","dependency_job_id":null,"html_url":"https://github.com/meap/lambda-costs","commit_stats":null,"previous_names":["meap/lambda-costs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/meap/lambda-costs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meap%2Flambda-costs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meap%2Flambda-costs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meap%2Flambda-costs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meap%2Flambda-costs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meap","download_url":"https://codeload.github.com/meap/lambda-costs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meap%2Flambda-costs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32587818,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"ssl_error","status_checked_at":"2026-05-03T22:09:10.534Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","aws-lambda","costs-optimization","finops","lambda"],"created_at":"2024-11-25T07:31:45.765Z","updated_at":"2026-05-03T22:33:06.918Z","avatar_url":"https://github.com/meap.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# What is this?\n\nThis node.js script provides a solution to calculate the costs associated with AWS Lambda functions. It automates the process of retrieving Lambda metrics using the AWS SDK, calculates costs based on metrics like memory usage, invocations, and execution time, and generates a detailed cost report in a CSV file.\n\n# How to Use\n\nThe script requires access to an AWS account in the specified region. This can be achieved by setting up environment variables.\n\n```\nexport AWS_ACCESS_KEY_ID=•••••\nexport AWS_SECRET_ACCESS_KEY=•••••\nexport AWS_REGION=us-east-1\n```\n\nNext, clone the repository and install the dependency.\n\n```\ngit clone git@github.com:meap/lambda-costs.git\ncd lambda-costs/\nnpm install\n```\n\nDefine the period (by months) for which you want to get metrics in the costs.js file. And run the command:\n\n```\nnpm run start\n```\n\n# Output\n\nThe output is in CSV format and can be easily imported into Google Sheets. Here is an example of the output. \n\n| FunctionName   |   MemoryAllocatedMB |   EphemeralStorageMB |   Invocations |   DurationMilliseconds |   InvocationCostUSD |   DurationCostUSD |   StorageCostUSD |   TotalCostUSD |\n|:---------------|--------------------:|---------------------:|--------------:|-----------------------:|--------------------:|------------------:|-----------------:|---------------:|\n| Owl            |                4096 |                 3072 |       2863583 |            24020100000 |            0.572717 |          1601.34  |          540.451 |         2142.37|\n| Kangaroo       |                6144 |                 3072 |         45838 |              468853000 |            0.009168 |            46.8854|           10.5492|           57.44|\n| Lion           |                2048 |                  512 |        909772 |              222943000 |            0.181954 |             7.4314|            0     |            7.61|\n| Zebra          |                3072 |                  512 |        343025 |               99898100 |            0.068605 |             4.9949|            0     |            5.06|\n| Dolphin        |                1024 |                  512 |        286866 |              221931000 |            0.057373 |             3.6988|            0     |            3.76|\n| Fox            |                 128 |                  512 |       2910858 |              396841000 |            0.582172 |             0.8268|            0     |            1.41|\n| Fox2           |                 256 |                  512 |        439937 |               89945100 |            0.087987 |             0.3748|            0     |            0.46|\n| Eagle          |                 512 |                  512 |        308730 |               38817400 |            0.061746 |             0.3235|            0     |            0.39|\n| Wolf           |                 128 |                  512 |       1033464 |               75264300 |            0.206693 |             0.1568|            0     |            0.36|\n| Tiger          |                 512 |                  512 |          7916 |               35873400 |            0.001583 |             0.2989|            0     |            0.30|\n| Shark          |                 256 |                  512 |         36314 |               14437600 |            0.007263 |             0.0602|            0     |            0.07|\n| Lion           |                 128 |                  512 |        239206 |                4662100 |            0.047841 |             0.0097|            0     |            0.06|\n| Panda          |                 256 |                  512 |          9243 |               11347500 |            0.001849 |             0.0473|            0     |            0.05|\n| Wolf           |                 256 |                  512 |         17194 |                9805070 |            0.003439 |             0.0409|            0     |            0.04|\n| Elephant       |                 256 |                  512 |         13223 |                6913890 |            0.002645 |             0.0288|            0     |            0.03|\n| Penguin        |                 256 |                  512 |          3534 |                7307320 |            0.000707 |             0.0304|            0     |            0.03|\n| Kangaroo       |                 256 |                  512 |         20642 |                2920700 |            0.004128 |             0.0122|            0     |            0.02|\n| Rabbit         |                 256 |                  512 |          8515 |                2815730 |            0.001703 |             0.0117|            0     |            0.01|\n| Deer           |                 128 |                  512 |          8526 |                4349520 |            0.001705 |             0.0091|            0     |            0.01|\n| Giraffe        |                 128 |                  512 |          8525 |                4252260 |            0.001705 |             0.0089|            0     |            0.01|\n| Leopard        |                 256 |                  512 |          6485 |                1627210 |            0.001297 |             0.0068|            0     |            0.01|\n| Bear           |                 256 |                  512 |           802 |                 751782 |            0.00016  |             0.0031|            0     |            0.00|\n| Giraffe        |                 256 |                  512 |           193 |                 760083 |            0.000039 |             0.0032|            0     |            0.00|\n| Dolphin        |                 256 |                  512 |           194 |                 345630 |            0.000039 |             0.0014|            0     |            0.00|\n| Shark          |                1024 |                  512 |            92 |                  56241 |            0.000018 |             0.0009|            0     |            0.00|\n| Elephant       |                 128 |                  512 |           197 |                 236965 |            0.000039 |             0.0005|            0     |            0.00|\n| Deer           |                 256 |                  512 |            53 |                 108903 |            0.000011 |             0.0005|            0     |            0.00|\n| Tiger          |                 128 |                  512 |           821 |                 142713 |            0.000164 |             0.0003|            0     |            0.00|\n| Koala          |                 256 |                  512 |            48 |                  56567 |            0.00001  |             0.0002|            0     |            0.00|\n| Zebra          |                 128 |                  512 |             6 |                  15816 |            0.000001 |             0.0000|            0     |            0.00|\n| Leopard        |                 128 |                  512 |             2 |                   3872 |            0        |             0.0000|            0     |            0.00|\n| Panda          |                 256 |                  512 |             0 |                      0 |            0        |             0     |            0     |            0.00|\n| Eagle          |                 256 |                  512 |             0 |                      0 |            0        |             0     |            0     |            0.00|\n| Hawk           |                 256 |                  512 |             0 |                      0 |            0        |             0     |            0     |            0.00|\n| Owl            |                 256 |                  512 |             0 |                      0 |            0        |             0     |            0     |            0.00|\n| Rabbit         |                1024 |                  512 |             0 |                      0 |            0        |             0     |            0     |            0.00|\n\n# License\n\nThe MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeap%2Flambda-costs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeap%2Flambda-costs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeap%2Flambda-costs/lists"}