Git Product home page Git Product logo

aws-wellarchitected-review-collector's Introduction

AWS Well-Architected Tool Review Collector

This solution sets up a small service that collects the high-level AWS Well-Architected review data for a given workload. It's currently for a single account, so you'd either need to modify this, or deploy this utility to each account you want to collect reviews from.

It's a convenient solution if you want, for example, to display the number of risks for a workload in your own dashboards or systems monitoring tool.

You could easily extend this solution with additional functionality; see the AWS docs on the WA tool for what is possible.

Prerequisites

  • Recent Node.js (ideally 18+) installed.
  • Amazon Web Services (AWS) account with sufficient permissions so that you can deploy infrastructure.
  • Ideally some experience with Serverless Framework as that's what we will use to deploy the service and infrastructure.
  • You will need to set up a workload in the AWS Well-Architected Tool manually, as that's not part of this solution.

Installation

Clone, fork, or download the repo as you normally would. Run npm install.

Commands

The below commands are the most critical ones. See package.json for more commands! Substitute npm for yarn or whatever floats your boat.

  • npm start: Run Serverless Framework in offline mode
  • npm run deploy: Deploy with Serverless Framework
  • npm run build: Package and build the code with Serverless Framework
  • npm run teardown: Removes the deployed stack

Configuration

You need to set your AWS account number. Do this either by passing it in via CLI, e.g. npx sls deploy --account 123412341234 or setting the fallback value in serverless.yml:

awsAccountNumber: ${opt:account, '123412341234'}

API examples

Request

The request requires the workload ID to be passed in.

Note that you might need to switch on the ID column if using the web console/UI as it's not visible by default.

curl https://RANDOM.execute-api.REGION.amazonaws.com/reviews?id=WORKLOAD_ID

Response

[
  {
    "LensAlias": "arn:aws:wellarchitected:eu-north-1:123412341234:lens/abcdef123456abcdef123456abcdef12",
    "LensArn": "arn:aws:wellarchitected:eu-north-1:123412341234:lens/abcdef123456abcdef123456abcdef12",
    "LensName": "My Custom Lens",
    "LensStatus": "CURRENT",
    "LensVersion": "0.1",
    "RiskCounts": { "UNANSWERED": 0, "HIGH": 7, "MEDIUM": 8, "NONE": 21, "NOT_APPLICABLE": 13 },
    "UpdatedAt": "2023-05-18T07:13:14.000Z"
  },
  {
    "LensAlias": "wellarchitected",
    "LensArn": "arn:aws:wellarchitected::aws:lens/wellarchitected",
    "LensName": "AWS Well-Architected Framework",
    "LensStatus": "CURRENT",
    "LensVersion": "2023-04-10",
    "RiskCounts": { "UNANSWERED": 0, "HIGH": 43, "MEDIUM": 4, "NONE": 1, "NOT_APPLICABLE": 12 },
    "UpdatedAt": "2023-05-18T07:17:46.000Z"
  }
]

aws-wellarchitected-review-collector's People

Contributors

mikaelvesavuori avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.