Skip to content
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

Week-0 #28

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"githubPullRequests.ignoredPullRequestBranches": [
"main"
]
}
35 changes: 35 additions & 0 deletions aws/json/alarm-config.json
Original file line number Diff line number Diff line change
@@ -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": 5,
"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
}]
}
31 changes: 31 additions & 0 deletions aws/json/budget.json
Original file line number Diff line number Diff line change
@@ -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"
}
16 changes: 16 additions & 0 deletions aws/json/notifications-with-subscribers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[
{
"Notification": {
"ComparisonOperator": "GREATER_THAN",
"NotificationType": "ACTUAL",
"Threshold": 60,
"ThresholdType": "PERCENTAGE"
},
"Subscribers": [
{
"Address": "[email protected]",
"SubscriptionType": "EMAIL"
}
]
}
]