{"id":13821272,"url":"https://github.com/Snapchat/aws-support-tickets-aggregator","last_synced_at":"2025-05-16T12:33:02.669Z","repository":{"id":42045676,"uuid":"179371174","full_name":"Snapchat/aws-support-tickets-aggregator","owner":"Snapchat","description":"AWS support tickets aggregation service","archived":false,"fork":false,"pushed_at":"2023-07-27T19:07:14.000Z","size":327,"stargazers_count":41,"open_issues_count":1,"forks_count":7,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-13T00:26:11.968Z","etag":null,"topics":["aws","cloudtrail"],"latest_commit_sha":null,"homepage":"https://aws.amazon.com/blogs/mt/cross-account-support-case-dashboard/","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/Snapchat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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":"2019-04-03T21:12:11.000Z","updated_at":"2024-09-13T15:40:38.000Z","dependencies_parsed_at":"2024-08-04T08:06:05.200Z","dependency_job_id":"e286ab06-d9d6-44f0-848a-d3951e69f927","html_url":"https://github.com/Snapchat/aws-support-tickets-aggregator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Snapchat%2Faws-support-tickets-aggregator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Snapchat%2Faws-support-tickets-aggregator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Snapchat%2Faws-support-tickets-aggregator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Snapchat%2Faws-support-tickets-aggregator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Snapchat","download_url":"https://codeload.github.com/Snapchat/aws-support-tickets-aggregator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254530639,"owners_count":22086651,"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":["aws","cloudtrail"],"created_at":"2024-08-04T08:01:18.976Z","updated_at":"2025-05-16T12:33:01.251Z","avatar_url":"https://github.com/Snapchat.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# AWS Support Cases Aggregator\n_AWS Support Cases aggregation for a multi-account organization_\n\n[![ci](https://github.com/Snapchat/aws-support-tickets-aggregator/workflows/ci/badge.svg?branch=master)](https://github.com/Snapchat/aws-support-tickets-aggregator/actions?query=workflow%3Aci+branch%3Amaster)\n\nThis is a simple CloudFormation-based serverless pipeline for collecting support case information from all users across an AWS Organization into a single database.\n\nThis allows users to easily discover and monitor all Support Cases within an organization. See our [AWS Blog Post](https://aws.amazon.com/blogs/mt/) for details.\n\n### AWS Support Cases Aggregator Architecture\n![aws-support-cases-aggregator-pipeline-diagram](docs/images/support-cases-aggregator-pipeline.png)\n\n\n### Topology - Hub and Spoke\nThis service uses a Hub (central aggregator account) and Spoke (member accounts) model.\nThe aggregator can be configured in two ways:\n\n1. Aggregator account is [AWS Organizations master account](docs/hub-spoke-topology.md#using-org-master-as-central-aggregator-account)\n\n2. Aggregator account is [NOT AWS Organizations master account](docs/hub-spoke-topology.md#using-separate-org-master-and-central-aggregator-accounts)\n\n\n### Setup\n#### Central Aggregator Account (Hub)\nEnsure you have permissions for creating requisite AWS resources including IAM roles and policies.\n\n##### Prerequisite Steps\n1. Create a S3 bucket in your central aggregator account to hold the CloudFormation stack template. Pass the bucket name to the `--cf_s3_bucket` parameter of the `run_cloudformation.sh` script.\n\n    \u003e The CloudFormation stack must be created in the same region as the aforementioned S3 bucket.\n\n2. Choose a free name for your CloudTrail S3 bucket. Pass it to the `--ct_s3_bucket` parameter of the `run_cloudformation.sh` script.\n\n    \u003e Ensure a bucket with the same name does not already exist, or the CloudFormation stack will fail to create.\n\n    \u003e The CloudFormation stack will handle bucket creation.\n\n3. (Optional) If your aggregator account will not be your AWS Organizations master account:\n    * Pass the role arn `arn:aws:iam::\u003cORG MASTER ACCOUNT ID\u003e:role/OrgListAccountsViewer` to the `--org_role` parameter of the `run_cloudformation.sh` script.\n    \u003e Note this role can be created in section [AWS Organizations Master Account #2](#aws-organizations-master-account)\n\n##### Creating the CloudFormation Stack\nRun the shell script:\n\n```bash\n./run_cloudformation.sh --profile=\u003cprofile_name\u003e --stack_name=\u003cstack name\u003e --cf_region=\u003ccloudformation region\u003e --cf_s3_bucket=\u003ccloudformation s3 bucket\u003e --ct_s3_bucket=\u003ccloudtrail S3 bucket\u003e [--template_file=\u003ctemplate file\u003e --org_role=\u003corg master role\u003e]\n```\n\n\u003e For instructions on how to set up an AWS command line profile, see the [AWS documentation](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html).\n\nYou may use any name in the `\u003cstack name\u003e` parameter (e.g. `central-support`).\n\n###### Setting the CloudTrail S3 Bucket\nCloudTrail trails from every account you wish to monitor must be deposit their events into the newly created CloudTrail S3 bucket specified in the `--ct_s3_bucket` parameter above.\n\nIf you are using an organization CloudTrail trail, you only need to modify that organization trail S3 bucket location. If not, you must set a CloudTrail trail in every member account you wish to monitor to use the newly created S3 bucket.\n\n#### Member Account (Spoke)\nCreate an IAM role called `GetSupportInfoRole` in every member account with `support:` and `support:Describe*` permissions that trusts the `SupportAggregator` role in the central aggregator account.\n\n\u003e For specific details, follow instructions [here.](docs/member_acc_role_setup.md)\n\n\n#### AWS Organizations Master Account\n1. Create an `organization trail` in your AWS organizations master account and configure the CloudTrail service to send events to your CloudTrail bucket.\n    \u003e For details on organization trails, see the AWS docs on [Creating a Trail for an Organization](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-trail-organization.html).\n\n    \u003e Deposit CloudTrail events into the CloudTrail S3 bucket specified in [central aggregator prerequisites #2](#prerequisite-steps).\n\n    \u003e You may also configure individual member accounts with CloudTrail trails that send events to the CloudTrail S3 bucket.\n\n2. (Optional) If your aggregator account will not be your AWS Organizations master account:\n    * Create an IAM Role `OrgListAccountsViewer` in the AWS Organizations master account that trusts central aggregator account and has role policy with `organizations:ListAccounts` actions. For specific details, follow instructions [here.](docs/org_master_role_setup.md)\n\n\n### Periodic Scanning\nThis pipeline scans case data from the past 60 days every 3 days. You can configure the scan to get all historical case data by setting `get_all_existing_cases(recent_cases_only=False)` in `support_cases_aggregator.py`.\n\nIf you do not use AWS Organizations, modify [list_account_ids()](src/support_cases_aggregator.py#L31) in `support_cases_aggregator.py` to return a list of strings of the account ids you want to monitor support cases for.\n\n## Project Resources\n[Development Guide](./docs/development.md)\n\n[Contributing Guide](./CONTRIBUTING.md)\n\n## License\n\n[The MIT License](http://opensource.org/licenses/MIT)\n\nCopyright (c) 2020 Snap Inc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSnapchat%2Faws-support-tickets-aggregator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSnapchat%2Faws-support-tickets-aggregator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSnapchat%2Faws-support-tickets-aggregator/lists"}