Please see the target section down below and try to achieve the items as many as you can.
-
Import csv file into database, your table MUST have the following columns down below. You can choose any Database service you want. e.g. Amazon RDS, Azure SQL Databae or local SQLite.
Column Description bill/PayerAccountId The account ID of the paying account. For an organization in AWS Organizations, this is the account ID of the master account. lineItem/UnblendedCost The UnblendedCost is the UnblendedRate multiplied by the UsageAmount. lineItem/UnblendedRate The uncombined rate for specific usage. For line items that have an RI discount applied to them, the UnblendedRate is zero. Line items with an RI discount have a UsageType of Discounted Usage. lineItem/UsageAccountId The ID of the account that used this line item. For organizations, this can be either the master account or a member account. You can use this field to track costs or usage by account. lineItem/UsageAmount The amount of usage that you incurred during the specified time period. For size-flexible reserved instances, use the reservation/TotalReservedUnits column instead. lineItem/UsageStartDate The start date and time for the line item in UTC, inclusive. The format is YYYY-MM-DDTHH:mm:ssZ. lineItem/UsageEndDate The end date and time for the corresponding line item in UTC, exclusive. The format is YYYY-MM-DDTHH:mm:ssZ. product/ProductName The full name of the AWS service. Use this column to filter AWS usage by AWS service. Sample values: AWS Backup, AWS Config, Amazon Registrar, Amazon Elastic File System, Amazon Elastic Compute Cloud -
Create DB index to enhance query performance.
-
Make APIs to achieve the following requirements
- Get lineItem/UnblendedCost grouping by product/productname
- Input
Column Required lineitem/usageaccountid true - Output
{ "{product/productname_A}": "sum(lineitem/unblendedcost)", "{product/productname_B}": "sum(lineitem/unblendedcost)", ... }
- Input
- Get daily lineItem/UsageAmount grouping by product/productname
- Input
Column Required lineitem/usageaccountid true - Output
{ "{product/productname_A}": { "YYYY/MM/01": "sum(lineItem/UsageAmount)", "YYYY/MM/02": "sum(lineItem/UsageAmount)", "YYYY/MM/03": "sum(lineItem/UsageAmount)", ... }, "{product/productname_B}": { "YYYY/MM/01": "sum(lineItem/UsageAmount)", "YYYY/MM/02": "sum(lineItem/UsageAmount)", "YYYY/MM/03": "sum(lineItem/UsageAmount)", ... }, }
- Input
- Get lineItem/UnblendedCost grouping by product/productname
-
Your can only use Python or C# to implement APIs.
-
(Optional) You can add more input arguments to your APIs to achieve paginaton strategy.
-
(Optional) Use your algorithm to reduce response time when calling the APIs.
- Upload codes to your GitHub and provide repo URL.
- Include a README.md file in the root of repo.
- Provide your API spec, API URLs, and DB schema to README.md.
- Use any kind of framework, e.g. ASP.NET 5, Django, Flask.
- (Optional) If you are using AWS / Azure / GCP, describe what services you are using.
- (Optional) Describe how you reduce the response time / improve performance to README.md.
- Once you finished the assignment, send an email back to the one who contacted you.
- Leave comments to README.md if there is any.