This repository has been archived by the owner on May 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Justin Nielsen
committed
Aug 1, 2022
1 parent
1a66d87
commit 4fa155f
Showing
4 changed files
with
39 additions
and
18 deletions.
There are no files selected for viewing
This file contains 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 @@ | ||
lambda.zip | ||
layer.zip | ||
deploy.sam.yaml |
This file contains 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 |
---|---|---|
@@ -1,19 +1,21 @@ | ||
#!/bin/bash | ||
#Suggest deploying to us-east-1 due to CE API, and SES | ||
export AWS_DEFAULT_REGION=us-east-1 | ||
export AWS_DEFAULT_REGION=us-west-2 | ||
#Change the below, an s3 bucket to store lambda code for deploy, and output report | ||
#Must be in same region as lambda (ie AWS_DEFAULT_REGION) | ||
export BUCKET=CHANGEME_THIS_IS_NOT_A_VALID_S3_BUCKET | ||
export BUCKET=xirgocamcostreports | ||
#Comma Seperated list of emails to send to | ||
export SES_TO=[email protected],email2@test.com | ||
export SES_FROM=email@test.com | ||
export SES_REGION=us-east-1 | ||
export SES_TO=jnielsen@sensata.com | ||
export SES_FROM=jnielsen@sensata.com | ||
export SES_REGION=us-west-2 | ||
#Comma Seperated list of Cost Allocation Tags (must be configured in AWS billing prefs) | ||
export COST_TAGS=CostGroup | ||
export COST_TAGS=Bucket-Name | ||
#Do you want partial figures for the current month (set to true if running weekly/daily) | ||
export CURRENT_MONTH=false | ||
#Day of Month, leave as 6 unless you want to capture refunds and final support values, then change to 12 | ||
export DAY_MONTH=6 | ||
#Set how many items are in the chart legend | ||
export LEGENDLENGTH=5 | ||
|
||
if [ ! -f bin/lambda.zip ]; then | ||
echo "lambda.zip not found! Downloading one we prepared earlier" | ||
|
@@ -36,4 +38,4 @@ aws cloudformation deploy \ | |
--parameter-overrides SESSendFrom=$SES_FROM S3Bucket=$BUCKET \ | ||
SESSendTo=$SES_TO SESRegion=$SES_REGION \ | ||
AccountLabel=Email ListOfCostTags=$COST_TAGS CurrentMonth=$CURRENT_MONTH \ | ||
DayOfMonth=$DAY_MONTH | ||
DayOfMonth=$DAY_MONTH LegendLength=$LEGENDLENGTH |
This file contains 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 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 |
---|---|---|
|
@@ -2,3 +2,4 @@ requests | |
xlsxwriter | ||
pandas | ||
numpy | ||
deploy.sam.yaml |