{"id":14065051,"url":"https://github.com/cloudandthings/terraform-aws-costnotifier","last_synced_at":"2025-04-30T09:16:37.800Z","repository":{"id":43097522,"uuid":"465629229","full_name":"cloudandthings/terraform-aws-costnotifier","owner":"cloudandthings","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-01T08:13:26.000Z","size":2866,"stargazers_count":12,"open_issues_count":4,"forks_count":3,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-30T09:16:23.115Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloudandthings.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","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,"zenodo":null}},"created_at":"2022-03-03T08:20:59.000Z","updated_at":"2024-10-15T07:56:34.000Z","dependencies_parsed_at":"2025-04-18T11:33:40.041Z","dependency_job_id":"bd5371cc-b57b-4461-98b1-aaf4d8b2213b","html_url":"https://github.com/cloudandthings/terraform-aws-costnotifier","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudandthings%2Fterraform-aws-costnotifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudandthings%2Fterraform-aws-costnotifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudandthings%2Fterraform-aws-costnotifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudandthings%2Fterraform-aws-costnotifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudandthings","download_url":"https://codeload.github.com/cloudandthings/terraform-aws-costnotifier/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251674590,"owners_count":21625646,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-08-13T07:04:15.734Z","updated_at":"2025-04-30T09:16:37.779Z","avatar_url":"https://github.com/cloudandthings.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# AWS Cost Notification Module\n\n### Purpose\n\nThis terraform module sends a daily cost report and the cost delta in a 7 day rolling period, scheduled on a CRON to a slack or teams channel of your choice.\n\nThe module also reports on the top 5 services attributing to the daily cost. Its a very rudimentary means of managing the cost of your AWS bill, but it does provide a 1000 ft view of the current expenses for the previous day. More on this module can be found on our [blog](https://medium.com/cloudandthings/aws-cost-notifier-e437bd311c54) on Medium.\n\n### Lambda deployment package\n\nThe Lambda function is deployed using a `.zip` deployment package. The package is contained within this module and also attached to the GitHub release.\n\nYou may choose one of the following options for the deployment:\n\n 1. **default:** If no `s3_*` variables are specified, then the package is used by the lambda directly.\n 2. **recommended**: `s3_bucket` can be specified to upload the package to the S3 bucket, for the lambda to use.\n    - `s3_prefix` can be specified to override the default location.\n    - `upload_deployment_to_s3=false` can be specified to disable the upload, in which case the package must be placed on s3 manually.\n\n\n\u003c!-- BEGIN_TF_DOCS --\u003e\n### Examples\n\nSee `examples` dropdown on Terraform Cloud, or [browse here](/examples/).\n\n----\n## Documentation\n\n----\n### Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_account_name\"\u003e\u003c/a\u003e [account\\_name](#input\\_account\\_name) | Name of your account to Identify your account in the notification message | `string` | n/a | yes |\n| \u003ca name=\"input_amber_threshold\"\u003e\u003c/a\u003e [amber\\_threshold](#input\\_amber\\_threshold) | Percentage exceeded threshold to send an amber alert and notify the slack channel | `string` | `\"20\"` | no |\n| \u003ca name=\"input_cloudwatch_logs_retention_in_days\"\u003e\u003c/a\u003e [cloudwatch\\_logs\\_retention\\_in\\_days](#input\\_cloudwatch\\_logs\\_retention\\_in\\_days) | Specifies the number of days you want to retain log events in the specified log group. Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, and 3653. | `number` | `14` | no |\n| \u003ca name=\"input_create_role\"\u003e\u003c/a\u003e [create\\_role](#input\\_create\\_role) | Controls whether IAM role for Lambda Function should be created | `bool` | `true` | no |\n| \u003ca name=\"input_emails_for_notifications\"\u003e\u003c/a\u003e [emails\\_for\\_notifications](#input\\_emails\\_for\\_notifications) | List of emails to receive cost notifier notifications | `list(string)` | `[]` | no |\n| \u003ca name=\"input_kms_key_arn\"\u003e\u003c/a\u003e [kms\\_key\\_arn](#input\\_kms\\_key\\_arn) | The alias, alias ARN, key ID, or key ARN of an AWS KMS key used to encrypt all resources. | `string` | `null` | no |\n| \u003ca name=\"input_lambda_description\"\u003e\u003c/a\u003e [lambda\\_description](#input\\_lambda\\_description) | Lambda function description. | `string` | `\"This function sends AWS cost notifications. Source: github.com/cloudandthings/terraform-aws-costnotifier\"` | no |\n| \u003ca name=\"input_lambda_role\"\u003e\u003c/a\u003e [lambda\\_role](#input\\_lambda\\_role) | IAM role ARN attached to the Lambda Function. This governs both who / what can invoke your Lambda Function, as well as what resources our Lambda Function has access to. See Lambda Permission Model for more details. | `string` | `\"\"` | no |\n| \u003ca name=\"input_lambda_runtime\"\u003e\u003c/a\u003e [lambda\\_runtime](#input\\_lambda\\_runtime) | The lambda runtime to use. One of: `[\"python3.9\", \"python3.8\", \"python3.7\"]` | `string` | `\"python3.8\"` | no |\n| \u003ca name=\"input_naming_prefix\"\u003e\u003c/a\u003e [naming\\_prefix](#input\\_naming\\_prefix) | Naming prefix used to name all resources | `string` | n/a | yes |\n| \u003ca name=\"input_notification_schedule\"\u003e\u003c/a\u003e [notification\\_schedule](#input\\_notification\\_schedule) | CRON expression to schedule notification | `string` | `\"cron(0 20 ? * MON-SUN *)\"` | no |\n| \u003ca name=\"input_permissions_boundary\"\u003e\u003c/a\u003e [permissions\\_boundary](#input\\_permissions\\_boundary) | ARN of the policy that is used to set the permissions boundary for the role. | `string` | `null` | no |\n| \u003ca name=\"input_red_threshold\"\u003e\u003c/a\u003e [red\\_threshold](#input\\_red\\_threshold) | Percentage exceeded threshold to send a red alert and notify the slack channel | `string` | `\"50\"` | no |\n| \u003ca name=\"input_s3_bucket\"\u003e\u003c/a\u003e [s3\\_bucket](#input\\_s3\\_bucket) | S3 bucket for deployment package. | `string` | `null` | no |\n| \u003ca name=\"input_s3_key\"\u003e\u003c/a\u003e [s3\\_key](#input\\_s3\\_key) | S3 object key for deployment package. Otherwise, defaults to `var.naming_prefix/local.deployment_filename`. | `string` | `null` | no |\n| \u003ca name=\"input_security_group_ids\"\u003e\u003c/a\u003e [security\\_group\\_ids](#input\\_security\\_group\\_ids) | List of VPC security group IDs associated with the Lambda function. | `list(string)` | `[]` | no |\n| \u003ca name=\"input_subnet_ids\"\u003e\u003c/a\u003e [subnet\\_ids](#input\\_subnet\\_ids) | List of VPC subnet IDs associated with the Lambda function. | `list(string)` | `[]` | no |\n| \u003ca name=\"input_tags\"\u003e\u003c/a\u003e [tags](#input\\_tags) | A mapping of tags to assign to the resources. | `map(string)` | `{}` | no |\n| \u003ca name=\"input_upload_deployment_to_s3\"\u003e\u003c/a\u003e [upload\\_deployment\\_to\\_s3](#input\\_upload\\_deployment\\_to\\_s3) | If `true`, the deployment package within this module repo will be copied to S3. If `false` then the S3 object must be uploaded separately. Ignored if `s3_bucket` is null. | `bool` | `true` | no |\n| \u003ca name=\"input_webhook_type\"\u003e\u003c/a\u003e [webhook\\_type](#input\\_webhook\\_type) | Either \"slack\" or \"teams\". | `string` | `\"slack\"` | no |\n| \u003ca name=\"input_webhook_urls\"\u003e\u003c/a\u003e [webhook\\_urls](#input\\_webhook\\_urls) | Webhook URLs to receive daily cost notifications on either Slack or Teams | `list(string)` | n/a | yes |\n\n----\n### Modules\n\n| Name | Source | Version |\n|------|--------|---------|\n| \u003ca name=\"module_billing_notifier_lambda\"\u003e\u003c/a\u003e [billing\\_notifier\\_lambda](#module\\_billing\\_notifier\\_lambda) | terraform-aws-modules/lambda/aws | 4.9.0 |\n\n----\n### Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_cost_notfier_lambda_name\"\u003e\u003c/a\u003e [cost\\_notfier\\_lambda\\_name](#output\\_cost\\_notfier\\_lambda\\_name) | Created lambda's name |\n\n----\n### Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_aws\"\u003e\u003c/a\u003e [aws](#provider\\_aws) | ~\u003e 4.9 |\n\n----\n### Requirements\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"requirement_terraform\"\u003e\u003c/a\u003e [terraform](#requirement\\_terraform) | \u003e= 0.15.0 |\n| \u003ca name=\"requirement_aws\"\u003e\u003c/a\u003e [aws](#requirement\\_aws) | ~\u003e 4.9 |\n| \u003ca name=\"requirement_null\"\u003e\u003c/a\u003e [null](#requirement\\_null) | ~\u003e 3.1 |\n\n----\n### Resources\n\n| Name | Type |\n|------|------|\n| [aws_cloudwatch_event_rule.billing_notifier_lambda_event_rule](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_event_rule) | resource |\n| [aws_cloudwatch_event_target.billing_notifier_lambda_event_target](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_event_target) | resource |\n| [aws_lambda_permission.billing_notifier_lambda_permission](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_permission) | resource |\n| [aws_s3_object.deployment](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_object) | resource |\n| [aws_sns_topic.cost_notifier](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sns_topic) | resource |\n| [aws_sns_topic_subscription.cost_notifier](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sns_topic_subscription) | resource |\n| [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source |\n\n----\n\u003c!-- END_TF_DOCS --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudandthings%2Fterraform-aws-costnotifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudandthings%2Fterraform-aws-costnotifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudandthings%2Fterraform-aws-costnotifier/lists"}