Use case
Currently our team need to spend large amount of time in manually consolidating multiple cloud accounts' bills into one single statement for our clients. As such, I have developed an in-house statement generation tool on AWS to automate consolidation of cloud vendor bills into customizable billing statements, saving hours of effort to and reducing human errors.
Key Features
- Provides a simple login system for authenticaiton and authorization
- Consolidate cloud vendor's raw bills into a single PDF statement
- Customizable PDF statement that allows input for address, ATTN, exchange rate, business logic, etc.
Solution Overview
The Cloud Billing Portal is a comprehensive AWS-based solution designed to simplify and automate the process of generating and managing cloud billing statements. This application provides a user-friendly interface for uploading billing data, processing it, and generating customized PDF billing statements.
The portal leverages various AWS services, including Lambda, API Gateway, S3, and Cognito, to create a secure and scalable billing management system. It offers features such as user authentication, file upload capabilities, and automated PDF generation based on uploaded billing data.
The following diagram depicts the architecture of this solution.
Installation and Deployment
Please refer to the GitHub repo for installation and deployment guide
Cost
Assumptions: 100 request per month to S3 and Lambda. 1 active user for signing into the portal
Monthly cost: 0.07 USD Yearly cost: 0.84 USD
No upfront cost.
Detailed estimation link: https://calculator.aws/#/estimate?id=73dac7b97d53a08857592a60c20f21541269b683
Limitations
Maximum payload
Maximum payload for Lambda is 6MB, so any amount of .csv which may lead produce a statement greater than 6MB will probably return 500 error.
Scaling strategies
The system scales well with the proposed fully serverless architecutre. However, to support more than 1,000 concurrent users, the default quota of Lambda it must be increased by Requesting a quota increase.
Cloud Vendor
Currently the portal only allows processing raw bills from Huawei Cloud. To allow input from other cloud vendors .csv, you will need to specify their respective csv format such as column names in /sam-CloudBillingPortal/myBillAcc.py
.
Potential Improvements
- Allow Sign-up Page redirect to cloud billing portal
- Setup custom DNS domain name
- Include WAF for better security
- Implement loggings such as CloudWatch to track usage and errors.
- Setup unit tests in the CI/CD pipeline.
- Use HTTPS for better security
Top comments (0)