Skip to content

Commit

Permalink
naming and readme change
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanaroth committed Sep 4, 2021
1 parent 4dc2972 commit 939eaa8
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 18 deletions.
File renamed without changes.
File renamed without changes.
68 changes: 50 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
* [Creating a Amazon EventBridge Ingestion ARN](#creating-a-amazon-eventbridge-ingestion-arn)
- [Setup](#setup)
* [AHA for users WITHOUT AWS Organizations](#aha-without-aws-organizations)
* [AHA for users WITH AWS Organizations](#aha-with-aws-organizations)
* [AHA for users WITH AWS Organizations (Management Account)](#aha-with-aws-organizations-using-management-account)
* [AHA for users WITH AWS Organizations (Member Account)](#aha-with-aws-organizations-using-member-account)
- [Updating](#updating)
- [New Features](#new-features)
- [Troubleshooting](#troubleshooting)
Expand All @@ -23,7 +24,12 @@
AWS Health Aware (AHA) is an automated notification tool for sending well-formatted AWS Health Alerts to Amazon Chime, Slack, Microsoft Teams, E-mail or an AWS Eventbridge compatible endpoint as long as you have Business or Enterprise Support.

# Architecture
![](https://github.com/aws-samples/aws-health-aware/blob/main/readme-images/architecture.png?raw=1)

## Single Region
![](https://github.com/aws-samples/aws-health-aware/blob/main/readme-images/aha-arch-single-region.png?raw=1)

## Multi Region
![](https://github.com/aws-samples/aws-health-aware/blob/main/readme-images/aha-arch-multi-region.png?raw=1)

| Resource | Description |
| ------------- | ------------------------------ |
Expand Down Expand Up @@ -108,13 +114,14 @@ AHA can send to multiple endpoints (webhook URLs, Email or EventBridge). To use
4. Give your Event bus a name and **click** *Create*.
5. For the deployment we will need the *Name* of the Event bus **(not the ARN)**.

# Setup -
There are 2 available ways to deploy AHA, both are done via the same CloudFormation template to make deployment as easy as possible.
# Setup
There are 3 available ways to deploy AHA, all are done via the same CloudFormation template to make deployment as easy as possible.

The 2 deployment methods for AHA are:
The 3 deployment methods for AHA are:

1. [**AHA for users NOT using AWS Organizations**](#aha-without-aws-organizations): Users NOT using AWS Organizations will be able to get Service Health Dashboard (SHD) events ONLY.
2. [**AHA for users who ARE using AWS Organizations**](#aha-with-aws-organizations): Users who ARE using AWS Organizations will be able to get Service Health Dashboard (SHD) events as well as aggregated Personal Health Dashboard (PHD) events for all accounts in their AWS Organization.
1. [**AHA for users WITHOUT AWS Organizations**](#aha-without-aws-organizations): Users NOT using AWS Organizations.
2. [**AHA for users WITH AWS Organizations (Management Account)**](#aha-with-aws-organizations-using-management-account): Users who ARE using AWS Organizations and deploying in the top-level management account.
3. [**AHA for users WITH AWS Organizations (Member Account)**](#aha-with-aws-organizations-using-member-account): Users who ARE using AWS Organizations and deploying in a member account in the organization to assume a role in the top-level management account.

## AHA Without AWS Organizations

Expand All @@ -127,14 +134,15 @@ The 2 deployment methods for AHA are:
-Launch the stack.
-In CloudFormation Console create a stack with new resources from the following S3 URL: https://s3.amazonaws.com/cloudformation-stackset-sample-templates-us-east-1/AWSCloudFormationStackSetExecutionRole.yml) - In *AdministratorAccountId* type in the 12 digit account number you're running the solution in (e.g. 000123456789)
-Launch the stack.

### Deployment

1. Clone the AHA package that from this repository. If you're not familiar with the process, [here](https://git-scm.com/docs/git-clone) is some documentation. The URL to clone is in the upper right-hand corner labeled `Clone uri`
2. In the root of this package you'll have two files; `handler.py` and `messagegenerator.py`. Use your tool of choice to zip them both up and name them with a unique name (e.g. aha-v1.8.zip). **Note: Putting the version number in the name will make upgrading AHA seamless.**
3. Upload the .zip you created in Step 1 to an S3 in the same region you plan to deploy this in.
4. In your AWS console go to *CloudFormation*.
5. In the *CloudFormation* console **click** *Create stack > With new resources (standard)*.
6. Under *Template Source* **click** *Upload a template file* and **click** *Choose file* and select `02_CFN_MR_DEPLOY_AHA.yml` **Click** *Next*.
6. Under *Template Source* **click** *Upload a template file* and **click** *Choose file* and select `CFN_DEPLOY_AHA.yml` **Click** *Next*.
7. -In *Stack name* type a stack name (i.e. AHA-Deployment).
-In *AWSOrganizationsEnabled* leave it set to default which is `No`. If you do have AWS Organizations enabled and you want to aggregate across all your accounts, you should be following the step for [AHA for users who ARE using AWS Organizations](#aha-with-aws-organizations)
-In *AWSHealthEventType* select whether you want to receive *all* event types or *only* issues.
Expand All @@ -147,11 +155,11 @@ The 2 deployment methods for AHA are:
-In *ARN of the AWS Organizations Management Account assume role* leave it set to default None as this is only for customers using AWS Organizations.
-In *Deploy in secondary region?* select another region to deploy AHA in. Otherwise leave to default No.
8. Scroll to the bottom and **click** *Next*.
9. Scroll to the bottom and **click** *Next* again.
9. Scroll to the bottom and **click** *Next* again.
10. Scroll to the bottom and **click** the *checkbox* and **click** *Create stack*.
11. Wait until *Status* changes to *CREATE_COMPLETE* (roughly 2-4 minutes or if deploying in a secondary region, it can take up to 30 minutes).

## AHA With AWS Organizations
## AHA With AWS Organizations Using Management Account

### Prerequisites

Expand All @@ -163,14 +171,15 @@ The 2 deployment methods for AHA are:
-Launch the stack.
-In CloudFormation Console create a stack with new resources from the following S3 URL: https://s3.amazonaws.com/cloudformation-stackset-sample-templates-us-east-1/AWSCloudFormationStackSetExecutionRole.yml) - In *AdministratorAccountId* type in the 12 digit account number you're running the solution in (e.g. 000123456789)
-Launch the stack.

### Deployment

1. Clone the AHA package that from this repository. If you're not familiar with the process, [here](https://git-scm.com/docs/git-clone) is some documentation. The URL to clone is in the upper right-hand corner labeled `Clone uri`
2. In the root of this package you'll have two files; `handler.py` and `messagegenerator.py`. Use your tool of choice to zip them both up and name them with a unique name (e.g. aha-v1.8.zip). **Note: Putting the version number in the name will make upgrading AHA seamless.**
3. Upload the .zip you created in Step 1 to an S3 in the same region you plan to deploy this in.
4. In your AWS console go to *CloudFormation*.
5. In the *CloudFormation* console **click** *Create stack > With new resources (standard)*.
6. Under *Template Source* **click** *Upload a template file* and **click** *Choose file* and select `02_CFN_MR_DEPLOY_AHA.yml` **Click** *Next*.
6. Under *Template Source* **click** *Upload a template file* and **click** *Choose file* and select `CFN_DEPLOY_AHA.yml` **Click** *Next*.
7. -In *Stack name* type a stack name (i.e. AHA-Deployment).
-In *AWSOrganizationsEnabled* change the dropdown to `Yes`. If you do NOT have AWS Organizations enabled you should be following the steps for [AHA for users who are NOT using AWS Organizations](#aha-without-aws-organizations)
-In *AWSHealthEventType* select whether you want to receive *all* event types or *only* issues.
Expand All @@ -180,19 +189,32 @@ The 2 deployment methods for AHA are:
-In the *Email Setup* section enter the From and To Email addresses as well as the Email subject. If you aren't configuring email, just leave it as is.
-In *EventSearchBack* enter in the amount of hours you want to search back for events. Default is 1 hour.
-In *Regions* enter in the regions you want to search for events in. Default is all regions. You can filter for up to 10, comma separated with (e.g. us-east-1, us-east-2).
-In *ARN of the AWS Organizations Management Account assume role* leave it set to default None, unless you are using a member account instead of the management account. Instructions for this configuration are in the next section.
-In *ARN of the AWS Organizations Management Account assume role* leave it set to default None.
-In *Deploy in secondary region?* select another region to deploy AHA in. Otherwise leave to default No.
8. Scroll to the bottom and **click** *Next*.
9. Scroll to the bottom and **click** *Next* again.
10. Scroll to the bottom and **click** the *checkbox* and **click** *Create stack*.
11. Wait until *Status* changes to *CREATE_COMPLETE* (roughly 2-4 minutes or if deploying in a secondary region, it can take up to 30 minutes).

### Deployment in AWS Organization Member Account
## AHA With AWS Organizations Using Member Account

### Prerequisites

1. [Enable Health Organizational View](https://docs.aws.amazon.com/health/latest/ug/enable-organizational-view-in-health-console.html) from the console, so that you can aggregate all Personal Health Dashboard (PHD) events for all accounts in your AWS Organization.
2. Have at least 1 [endpoint](#configuring-an-endpoint) configured (you can have multiple)
3. Have access to deploy Cloudformation Templates with the following resources: AWS IAM policies, Amazon DynamoDB Tables, AWS Lambda, Amazon EventBridge and AWS Secrets Manager in the **AWS Organizations Master Account**.
4. -If using Multi-Region, you must deploy the following 2 CloudFormation templates to allow the Stackset deployment to deploy resources **even if you have full administrator privileges, you still need to follow these steps**.
-In CloudFormation Console create a stack with new resources from the following S3 URL: https://s3.amazonaws.com/cloudformation-stackset-sample-templates-us-east-1/AWSCloudFormationStackSetAdministrationRole.yml - this will allows CFT Stacksets to launch AHA in another region
-Launch the stack.
-In CloudFormation Console create a stack with new resources from the following S3 URL: https://s3.amazonaws.com/cloudformation-stackset-sample-templates-us-east-1/AWSCloudFormationStackSetExecutionRole.yml) - In *AdministratorAccountId* type in the 12 digit account number you're running the solution in (e.g. 000123456789)
-Launch the stack.

### Deployment

1. Clone the AHA package from the BETA-member-deployment folder. If you're not familiar with the process, [here](https://git-scm.com/docs/git-clone) is some documentation. The URL to clone is in the upper right-hand corner labeled `Clone uri`
1. Clone the AHA package that from this repository. If you're not familiar with the process, [here](https://git-scm.com/docs/git-clone) is some documentation. The URL to clone is in the upper right-hand corner labeled `Clone uri`
2. In your top-level management account AWS console go to *CloudFormation*
3. In the *CloudFormation* console **click** *Create stack > With new resources (standard)*.
4. Under *Template Source* **click** *Upload a template file* and **click** *Choose file* and select `01_CFN_MGMT_ROLE.yml` **Click** *Next*.
4. Under *Template Source* **click** *Upload a template file* and **click** *Choose file* and select `CFN_MGMT_ROLE.yml` **Click** *Next*.
5. -In *Stack name* type a stack name (i.e. aha-assume-role).
-In *OrgMemberAccountId* put in the account id of the member account you plan to run AHA in (e.g. 000123456789).
6. Scroll to the bottom and **click** *Next*.
Expand All @@ -204,7 +226,7 @@ The 2 deployment methods for AHA are:
12. Upload the .zip you created in Step 11 to an S3 in the same region you plan to deploy this in.
13. Login to the member account you plan to deploy this in and in your AWS console go to *CloudFormation*.
14. In the *CloudFormation* console **click** *Create stack > With new resources (standard)*.
15. Under *Template Source* **click** *Upload a template file* and **click** *Choose file* and select `02_CFN_MR_DEPLOY_AHA.yml` **Click** *Next*.
15. Under *Template Source* **click** *Upload a template file* and **click** *Choose file* and select `CFN_DEPLOY_AHA.yml` **Click** *Next*.
16. -In *Stack name* type a stack name (i.e. AHA-Deployment).
-In *AWSOrganizationsEnabled* change the dropdown to `Yes`. If you do NOT have AWS Organizations enabled you should be following the steps for [AHA for users who are NOT using AWS Organizations](#aha-without-aws-organizations)
-In *AWSHealthEventType* select whether you want to receive *all* event types or *only* issues.
Expand All @@ -219,19 +241,29 @@ The 2 deployment methods for AHA are:
17. Scroll to the bottom and **click** *Next*.
18. Scroll to the bottom and **click** *Next* again.
19. Scroll to the bottom and **click** the *checkbox* and **click** *Create stack*.
12. Wait until *Status* changes to *CREATE_COMPLETE* (roughly 2-4 minutes or if deploying in a secondary region, it can take up to 30 minutes).
20. Wait until *Status* changes to *CREATE_COMPLETE* (roughly 2-4 minutes or if deploying in a secondary region, it can take up to 30 minutes).

# Updating
**Until this project is migrated to the AWS Serverless Application Model (SAM), updates will have to be done as described below:**
1. Download the updated CloudFormation Template .yml file and 2 `.py` files.
2. Zip up the 2 `.py` files and name the .zip with a different version number than before (e.g. if the .zip you originally uploaded is aha-v1.8.zip the new one should be aha-v1.9.zip)
3. In the AWS CloudFormation console **click** on the name of your stack, then **click** *Update*.
4. In the *Prepare template* section **click** *Replace current template*, **click** *Upload a template file*, **click** *Choose file*, select the newer `02_CFN_MR_DEPLOY_AHA.yml` file you downloaded and finally **click** *Next*.
4. In the *Prepare template* section **click** *Replace current template*, **click** *Upload a template file*, **click** *Choose file*, select the newer `CFN_DEPLOY_AHA.yml` file you downloaded and finally **click** *Next*.
5. In the *S3Key* text box change the version number in the name of the .zip to match name of the .zip you uploaded in Step 2 (The name of the .zip has to be different for CloudFormation to recognize a change). **Click** *Next*.
6. At the next screen **click** *Next* and finally **click** *Update stack*. This will now upgrade your environment to the latest version you downloaded.

**If for some reason, you still have issues after updating, you can easily just delete the stack and redeploy. The infrastructure can be destroyed and rebuilt within minutes through CloudFormation.**

# New Features
We are happy to announce the launch of new enhancements to AHA. Please try them out and keep sendings us your feedback!
1. Multi-region deployment option
2. Updated file names for improved clarity
2. Ability to filter accounts (Refer to AccountIDs CFN parameter for more info on how to exclude accounts from AHA notifications)
3. Ability to view Account Names for a given Account ID in the PHD alerts
4. If you are running AHA with the Non-Org mode, AHA will send the Account #' and resource(s) impacts if applicable for a given alert
5. Ability to deploy AHA with the Org mode on a member account
6. Support for a new Health Event Type - "Investigation"

# Troubleshooting
* If for whatever reason you need to update the Webhook URL; just update the CloudFormation Template with the new Webhook URL.
* If you are expecting an event and it did not show up it may be an oddly formed event. Take a look at *CloudWatch > Log groups* and search for the name of your Cloudformation stack and Lambda function. See what the error is and reach out to us [email](mailto:[email protected]) for help.
Binary file modified readme-images/aha-arch-single-region.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified readme-images/architecture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 939eaa8

Please sign in to comment.