All Projects → awslabs → Aws Multi Account Viewer

awslabs / Aws Multi Account Viewer

Licence: other
Serverless app designed for any customer with two or more accounts to view resources across accounts/regions in simple single pane of glass website

Programming Languages

javascript
184084 projects - #8 most used programming language
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Aws Multi Account Viewer

Serverless static website with basic auth
Builds a serverless infrastructure in AWS for hosting a static website protected with Basic Authentication and published on a subdomain registered via Route 53
Stars: ✭ 112 (+28.74%)
Mutual labels:  aws, serverless, cloudformation
Aws Demos
A hands on repo with multiple demonstrations on AWS 🎓
Stars: ✭ 324 (+272.41%)
Mutual labels:  aws, serverless, cloudformation
Scar
Deploy static websites in seconds - with HTTPS, a global CDN, and custom domains.
Stars: ✭ 1,715 (+1871.26%)
Mutual labels:  aws, serverless, cloudformation
Awesome Aws
A curated list of awesome Amazon Web Services (AWS) libraries, open source repos, guides, blogs, and other resources. Featuring the Fiery Meter of AWSome.
Stars: ✭ 9,895 (+11273.56%)
Mutual labels:  aws, serverless, cloudformation
Cloudmagick
CloudMagick is a serverless application which provides a dynamic image transformation like the small light module of apache2
Stars: ✭ 11 (-87.36%)
Mutual labels:  aws, serverless, cloudformation
Serverless Dynamodb Autoscaling
Serverless Plugin for Amazon DynamoDB Auto Scaling configuration.
Stars: ✭ 142 (+63.22%)
Mutual labels:  aws, serverless, cloudformation
Serverlessbydesign
A visual approach to serverless development. Think. Build. Repeat.
Stars: ✭ 254 (+191.95%)
Mutual labels:  aws, serverless, cloudformation
Dawson Cli
A serverless web framework for Node.js on AWS (CloudFormation, CloudFront, API Gateway, Lambda)
Stars: ✭ 721 (+728.74%)
Mutual labels:  aws, serverless, cloudformation
Serverless Aws Lambda Node Postgres
Serverless AWS Lambda with Node.js,Postgres Rest API with Sequelize.
Stars: ✭ 18 (-79.31%)
Mutual labels:  aws, serverless, cloudformation
Aws Toolkit Vscode
AWS Toolkit for Visual Studio Code, an extension for working with AWS services including AWS Lambda.
Stars: ✭ 823 (+845.98%)
Mutual labels:  aws, serverless, cloudformation
Shorty.sls
Serverless URL shortener written in Python3 using the serverless framework
Stars: ✭ 35 (-59.77%)
Mutual labels:  aws, serverless, cloudformation
Aws Auto Terminate Idle Emr
AWS Auto Terminate Idle AWS EMR Clusters Framework is an AWS based solution using AWS CloudWatch and AWS Lambda using a Python script that is using Boto3 to terminate AWS EMR clusters that have been idle for a specified period of time.
Stars: ✭ 21 (-75.86%)
Mutual labels:  aws, serverless, cloudformation
Serverless
This is intended to be a repo containing all of the official AWS Serverless architecture patterns built with CDK for developers to use. All patterns come in Typescript and Python with the exported CloudFormation also included.
Stars: ✭ 1,048 (+1104.6%)
Mutual labels:  aws, serverless, cloudformation
Cform Vscode
CloudFormation extension for Visual Studio Code
Stars: ✭ 73 (-16.09%)
Mutual labels:  aws, cloudformation
Serverless Cljs Plugin
Serverless plugin for Clojurescript deployment w/ cljs-lambda
Stars: ✭ 72 (-17.24%)
Mutual labels:  aws, serverless
Serverless Node Simple Image Resize
Simple image resize AWS lambda function
Stars: ✭ 74 (-14.94%)
Mutual labels:  aws, serverless
Serverless Plugin Git Variables
⚡️ Expose git variables to serverless
Stars: ✭ 75 (-13.79%)
Mutual labels:  aws, serverless
Serverless Slackbot
A boilerplate Serverless Slackbot framework with a custom scripts folder (like Hubot)
Stars: ✭ 72 (-17.24%)
Mutual labels:  aws, serverless
Serverless Node Simple Messaging
Simple email AWS lambda function
Stars: ✭ 75 (-13.79%)
Mutual labels:  aws, serverless
Cfn Sphere
AWS CloudFormation stack management tool
Stars: ✭ 76 (-12.64%)
Mutual labels:  aws, cloudformation

Serverless app designed for any customer with two or more accounts to view resources/tags across accounts/regions in simple single pane of glass website. It's split into 2 customizable parts:

  • Back-End (CloudFormation templates and Python Lambdas)
  • Front-End (React with Amplify)

Current working examples are:

  • AWS Accounts in Organizations
  • EC2, CLB/ALB/NLB, Lambda, ODCR, Reserved Instances, RDS, EKS, Lightsail
  • IAM Users, Roles, Policy’s
  • VPCs, Subnets
  • S3 Buckets, EBS Volumes
  • Private and Public IP's
  • All Tags

Demo

Demo website coming this week.

On this Page

Architecture

Architecture

Requirements

Install Overview

Administrator account is the account you will use to access all sub accounts and where you will store everything. SubAccounts only requires the SubAccountAccess template to be created.

  • Clone repo.
  • Run CloudFormation template in your sub accounts (SubAccountAccess.yaml).
  • Run CloudFormation template in your main account (MainTemplate.yaml).
  • Run React App.

Deploying the Solution

Sub Accounts

  • Note the Account number for your Administrator Account and put it into the SubAccountAccess template.
  • Edit the SubAccountAccess.yaml with your Administrator Account Number (this account number will be your Administrator account that will have access to view all the sub accounts from)
  • Save and Run the SubAccountAccess.yaml in all your sub accounts you want to view. (I recommend using StackSets if you have them enabled otherwise manual is fine)

Administrator Account

  • Create a new S3 bucket to store the lambda zip files
aws s3 mb s3://your-unique-bucket-name --region ap-southeast-2
  • Package up all the lambdas into one zip file (e.g functions.zip): see example below or doco here

  • The only external python modules: boto3

cd /aws-multi-account-viewer/Back-End/lambdas
python3.7 -m venv .venv
source .venv/bin/activate
cd build
pip install -r ../requirements.txt --target .
zip -r9 ../functions.zip .
cd ../
zip -g functions.zip list_table.py receive_sqs_message.py send_sqs_message.py
deactivate
  • Copy the functions.zip file you just packaged into the s3 bucket you created earlier.
aws s3 cp functions.zip s3://your-unique-bucket-name

CloudFormation Parameters

Everyone's accounts and regions vary so this example is set to the free tier for DynamoDB AutoScaling is configured for DynamoDB so it will between the 2 parameters you specifiy.

  • Update all the parameters to match your config/accounts/bucket in MainTemplate.yaml
  • Deploy the CloudFormation template in the admin account once you have updated the paramaters
  • Once the CloudFormation has completed copy the details in the outputs:
    • ApiGateWayEndPoint
    • UserPoolId
    • userPoolWebClientId

  • Create a user account for the Cognito User Pool (sign up is disabled, so users have to be created manually)
  • Cognito > User Pools > {YourStackName} > Users and groups > Create User.
  • Now navigate to Front-End and Install dependencies
cd /aws-multi-account-viewer/Front-End/
yarn

  • Start React Page
yarn start

  • You should now see a login page from React

  • Log in with the user you created earlier.
  • You now have a local version up and running, you could now safely host as a public s3 bucket. (not covered in this project but you can see examples online on how to set it up: S3-Public-Website)
  • A really good article on setting React up with S3 by Antoine Sauvage: Here

Adding New Services

To add a new services, see example for this git commit:

  • Example of adding a new service EKS here EKS

Troubleshooting

No data is being populated on the web site?

  • Check SQS to make sure the messages are going through to lambda
  • If there’s lots of messages in the queue then there’s an issue with the lambda or DynamoDB is throttling the requests.

Site breaks when hosted on s3?

  • There's a good guide above on how to host React on S3, most common gotcha is error document:

Lambda Logs Overview?

  • You can check all three lambdas logs easy in CloudWatch Insights:

Lambda Logs Error & Exceptions:

Copy and paste query below to only see Errors & Exceptions: (this example is showing throttle requests on DynamoDB because its set too low):

fields @message 
| filter @message like /Error/ or @message like /Exception/
| limit 50

Tables are empty?

  • Check SQS queue to see what services are failing
  • View CloudWatch Logs above across receive/send lambda's to see where the issue is.

License Summary

This sample code is made available under the MIT-0 license. See the LICENSE file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].