-
Notifications
You must be signed in to change notification settings - Fork 99
[Lambda: Tracking AWS CE] Generate running data from AWS CE #6682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
70ae532
add model test1
yangw-dev 9bf4c56
add model test1
yangw-dev a674c79
add model test1
yangw-dev 201ac02
add model test1
yangw-dev a89b33e
add model test1
yangw-dev 2e61dfa
add model test1
yangw-dev 8168249
add model test1
yangw-dev b45ecdb
add model test1
yangw-dev 875f826
add model test1
yangw-dev 1b7398f
add model test1
yangw-dev 329ed4e
add model test1
yangw-dev baf74e5
add model test1
yangw-dev a1be4a7
add model test1
yangw-dev dbb5a3c
add model test1
yangw-dev d946cfc
add model test1
yangw-dev b746476
add model test1
yangw-dev 1afc630
add model test1
yangw-dev c8ef284
add model test1
yangw-dev 1a12c0f
add model test1
yangw-dev a849870
add model test1
yangw-dev d37a262
add model test1
yangw-dev d4a3699
add model test1
yangw-dev 3712afc
add model test1
yangw-dev 18cde63
add model test1
yangw-dev 25e8f4d
add model test1
yangw-dev 76d0e50
Update aws/lambda/oss_ci_aws_ce_tracking/lambda_function.py
yangw-dev bddc1c7
add model test1
yangw-dev 747fbbc
add model test1
yangw-dev 9d90f0b
add model test1
yangw-dev e494dbc
add model test1
yangw-dev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.zip | ||
deployment/ | ||
venv/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
all: run-local | ||
|
||
clean: | ||
rm -rf deployment | ||
rm -rf venv | ||
rm -rf deployment.zip | ||
|
||
venv/bin/python: | ||
virtualenv venv | ||
venv/bin/pip install -r requirements.txt | ||
|
||
deployment.zip: | ||
mkdir -p deployment | ||
cp lambda_function.py ./deployment/. | ||
pip3.10 install -r requirements.txt -t ./deployment/. --platform manylinux2014_x86_64 --only-binary=:all: --implementation cp --python-version 3.10 --upgrade | ||
cd ./deployment && zip -q -r ../deployment.zip . | ||
|
||
.PHONY: create-deployment-package | ||
create-deployment-package: deployment.zip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# AWS Cost Explorer Data Processing | ||
This Python script is designed to fetch and process AWS Cost Explorer data, specifically focusing on EC2 usage with Daily granularity. | ||
|
||
This Lambda function runs daily and retrieves AWS Cost Explorer data for the date two days prior due to the delay in AWS Cost Explorer data availability. | ||
|
||
## Usage | ||
### Local Execution | ||
To run the script locally, use the following command: | ||
|
||
```bash | ||
python lambda_function.py --clickhouse-endpoint <endpoint> --clickhouse-username <username> --clickhouse-password <password> [--not-dry-run] [--start-time <start_time>] [--end-time <end_time>] | ||
``` | ||
* `--clickhouse-endpoint`: The ClickHouse endpoint URL. | ||
* `--clickhouse-username`: The ClickHouse username. | ||
* `--clickhouse-password`: The ClickHouse password. | ||
* `--not-dry-run`: Optional. If set, the script will write results to the database. | ||
* `--start-time`: Optional. Start time in UTC ISO8601 format (e.g., 2025-05-28T00:00:00Z). Otherwise, the script will use the current time minus 2 day. | ||
* `--end-time`: Optional. End time in UTC ISO8601 format (e.g., 2025-05-29T00:00:00Z). Otherwise, the script will use the current time minus 1 day. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.