Giter Club home page Giter Club logo

ecloud_demo_api's Introduction

eCloud Vally API Enhancement

AWS Service duration:2021-08-30~2021-09-05

how to use eCloud Vally API

Servers:https://tsdczqspc3.execute-api.ap-northeast-1.amazonaws.com/dev

  1. lineItem/UnblendedCost grouping by product/productname

    POST /billing/total/

    parameters: {lineitem/usageaccountid: string}

example:

POST https://tsdczqspc3.execute-api.ap-northeast-1.amazonaws.com/dev/billing/total
Content-Type: application/json
{
  "lineitem/usageaccountid": "959256351448"
}
{
  "AWS Data Transfer": 0.0,
  "AWS Lambda": 1.908,
  "Amazon DynamoDB": 0.0,
  "Amazon Simple Storage Service": 0.001,
  "Amazon Virtual Private Cloud": 72.0,
  "AmazonCloudWatch": 0.066
}

  1. Get daily lineItem/UsageAmount grouping by product/productname

    POST /billing/daily/

    parameters: {lineitem/usageaccountid: string}

example:

POST https://tsdczqspc3.execute-api.ap-northeast-1.amazonaws.com/dev/billing/daily
Content-Type: application/json
{
  "lineitem/usageaccountid": "959256351448"
}
{
  "AWS Data Transfer": {
    "2020-04-01": 0.0
  },
  "AWS Lambda": {
    "2020-04-01": 0.008,
		..
  }
}

eCloud Vally API architecture

backend architecture photo

主要使用flask架構建置API,並參考zappa serverless 部署在lambda上。

參考連結:Deploy a Serverless Web App on AWS Lambda with Zappa

Database schema

billing

Column Schema Null or not
idx varchar(10) DEFAULT NULL
bill/PayerAccountId varchar(20) DEFAULT NULL
lineItem/UnblendedCost double DEFAULT NULL
lineItem/UnblendedRate double DEFAULT NULL
lineItem/UsageAccountId varchar(20) DEFAULT NULL
lineItem/UsageAmount double DEFAULT NULL
lineItem/UsageStartDate timestamp DEFAULT NULL
lineItem/UsageEndDate timestamp DEFAULT NULL
product/ProductName varchar(100) DEFAULT NULL

index

lineitem/usageaccountid,product/ProductName

Future optimization direction

  • add RDS proxy to use connection pool

Billing Analysis

billing insight

視覺化分析放在Tableau community,詳細的內容會再另外報告。

ecloud_demo_api's People

Contributors

ray1223 avatar

Watchers

James Cloos 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.