From 7bbeb0666e983e7c83ad416f1e38713203ab0e42 Mon Sep 17 00:00:00 2001 From: madhur_20 Date: Wed, 24 Apr 2024 11:39:12 +0000 Subject: [PATCH 1/6] main --- .gitpod.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.gitpod.yml b/.gitpod.yml index a0ba1af5e..cb39f04a1 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,4 +1,13 @@ - +tasks: + - name: aws-cli + env: + AWS_CLI_AUTO_PROMPT: on-partial + init: | + cd /workspace + curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" + unzip awscliv2.zip + sudo ./aws/install + cd $THEIA_WORKSPACE_ROOT vscode: extensions: - 42Crunch.vscode-openapi \ No newline at end of file From dc70f0f270ae8920dd31dadc7fb3bd4ad7ff2e95 Mon Sep 17 00:00:00 2001 From: madhur_20 Date: Wed, 29 May 2024 12:25:14 +0000 Subject: [PATCH 2/6] This is main repo --- .gitpod.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.gitpod.yml b/.gitpod.yml index cb39f04a1..a0ba1af5e 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,13 +1,4 @@ -tasks: - - name: aws-cli - env: - AWS_CLI_AUTO_PROMPT: on-partial - init: | - cd /workspace - curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" - unzip awscliv2.zip - sudo ./aws/install - cd $THEIA_WORKSPACE_ROOT + vscode: extensions: - 42Crunch.vscode-openapi \ No newline at end of file From 549c0137226814d2c22e7fb837faeaeedd4f9549 Mon Sep 17 00:00:00 2001 From: madhur_20 Date: Wed, 29 May 2024 12:25:50 +0000 Subject: [PATCH 3/6] This is main --- .vscode/settings.json | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..b242572ef --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "githubPullRequests.ignoredPullRequestBranches": [ + "main" + ] +} \ No newline at end of file From d905c5a56d34ea4943eeaaeaf8cea52c8a71332f Mon Sep 17 00:00:00 2001 From: madhur_20 Date: Wed, 29 May 2024 12:29:51 +0000 Subject: [PATCH 4/6] This is week-0 --- .gitpod.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.gitpod.yml b/.gitpod.yml index a0ba1af5e..cb39f04a1 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,4 +1,13 @@ - +tasks: + - name: aws-cli + env: + AWS_CLI_AUTO_PROMPT: on-partial + init: | + cd /workspace + curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" + unzip awscliv2.zip + sudo ./aws/install + cd $THEIA_WORKSPACE_ROOT vscode: extensions: - 42Crunch.vscode-openapi \ No newline at end of file From 1ff9961167601c902e764f9b4cff0c64034ef773 Mon Sep 17 00:00:00 2001 From: madhur_20 Date: Wed, 29 May 2024 13:10:49 +0000 Subject: [PATCH 5/6] This is Alarm and Budget Commit --- aws/json/alarm-config.json | 35 ++++++++++++++++++++ aws/json/budget.json | 31 +++++++++++++++++ aws/json/notifications-with-subscribers.json | 16 +++++++++ 3 files changed, 82 insertions(+) create mode 100644 aws/json/alarm-config.json create mode 100644 aws/json/budget.json create mode 100644 aws/json/notifications-with-subscribers.json diff --git a/aws/json/alarm-config.json b/aws/json/alarm-config.json new file mode 100644 index 000000000..33ab66e5a --- /dev/null +++ b/aws/json/alarm-config.json @@ -0,0 +1,35 @@ +{ + "AlarmName": "DailyEstimatedCharges", + "AlarmDescription": "This alarm would be triggered if the daily estimated charges exceeds 1$", + "ActionsEnabled": true, + "AlarmActions": [ + "arn:aws:sns:us-east-1:834270729588:billing-alarm" + ], + "EvaluationPeriods": 1, + "DatapointsToAlarm": 1, + "Threshold": 1, + "ComparisonOperator": "GreaterThanOrEqualToThreshold", + "TreatMissingData": "breaching", + "Metrics": [{ + "Id": "m1", + "MetricStat": { + "Metric": { + "Namespace": "AWS/Billing", + "MetricName": "EstimatedCharges", + "Dimensions": [{ + "Name": "Currency", + "Value": "USD" + }] + }, + "Period": 86400, + "Stat": "Maximum" + }, + "ReturnData": false + }, + { + "Id": "e1", + "Expression": "IF(RATE(m1)>0,RATE(m1)*86400,0)", + "Label": "DailyEstimatedCharges", + "ReturnData": true + }] + } \ No newline at end of file diff --git a/aws/json/budget.json b/aws/json/budget.json new file mode 100644 index 000000000..8b36aeb5e --- /dev/null +++ b/aws/json/budget.json @@ -0,0 +1,31 @@ +{ + "BudgetLimit": { + "Amount": "1", + "Unit": "USD" + }, + "BudgetName": "AWS Project Budget", + "BudgetType": "COST", + "CostFilters": { + "TagKeyValue": [ + "user:Key$value1", + "user:Key$value2" + ] + }, + "CostTypes": { + "IncludeCredit": true, + "IncludeDiscount": true, + "IncludeOtherSubscription": true, + "IncludeRecurring": true, + "IncludeRefund": true, + "IncludeSubscription": true, + "IncludeSupport": true, + "IncludeTax": true, + "IncludeUpfront": true, + "UseBlended": false + }, + "TimePeriod": { + "Start": 1477958399, + "End": 3706473600 + }, + "TimeUnit": "MONTHLY" + } \ No newline at end of file diff --git a/aws/json/notifications-with-subscribers.json b/aws/json/notifications-with-subscribers.json new file mode 100644 index 000000000..470cab5e4 --- /dev/null +++ b/aws/json/notifications-with-subscribers.json @@ -0,0 +1,16 @@ +[ + { + "Notification": { + "ComparisonOperator": "GREATER_THAN", + "NotificationType": "ACTUAL", + "Threshold": 60, + "ThresholdType": "PERCENTAGE" + }, + "Subscribers": [ + { + "Address": "madhur.cloudevops@gmail.com", + "SubscriptionType": "EMAIL" + } + ] + } + ] \ No newline at end of file From c95b373e9cc678be61f4056809ee0f6a8f3bcfde Mon Sep 17 00:00:00 2001 From: madhur_20 Date: Thu, 30 May 2024 08:59:25 +0000 Subject: [PATCH 6/6] Threshold value change --- aws/json/alarm-config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/json/alarm-config.json b/aws/json/alarm-config.json index 33ab66e5a..487b3c183 100644 --- a/aws/json/alarm-config.json +++ b/aws/json/alarm-config.json @@ -7,7 +7,7 @@ ], "EvaluationPeriods": 1, "DatapointsToAlarm": 1, - "Threshold": 1, + "Threshold": 5, "ComparisonOperator": "GreaterThanOrEqualToThreshold", "TreatMissingData": "breaching", "Metrics": [{