-
Notifications
You must be signed in to change notification settings - Fork 7
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
Showing
9 changed files
with
74 additions
and
36 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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.DS_Store | ||
.idea/ | ||
info.log | ||
# Byte-compiled / optimized / DLL files | ||
|
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,21 @@ | ||
# Setting up Lambda | ||
There are 3 parts to configuring this to run as a Lambda | ||
1. IAM Role for Lambda - The IAM Role for you Lambda will have to give permissions for Lambda and Cost Explorer. | ||
2. Trigger - Event Bridge(Cloudwatch Alarms) setup with a cron expression to trigger a run daily. | ||
3. Function Code - You can directly paste in the get_forecast.py file is all ready to go. | ||
|
||
## IAM Role | ||
When you create the Lambda it will create a role for you with required Lambda permissions, you must add the following | ||
permissions to it: | ||
![Lambda IAM Role](https://github.com/jimzucker/aws-forecast/blob/master/images/IAM_permissions.png) | ||
|
||
## Configuring Trigger | ||
Here is an example trigger, keep in mind the cron runs in UTC Timezone. | ||
![Lambda Trigger](https://github.com/jimzucker/aws-forecast/blob/master/images/event_bridge.png) | ||
|
||
## Function Code | ||
You can directly copy and paste get_forecast.py into the Lambda definition without modifications. | ||
![Lambda Function Code](https://github.com/jimzucker/aws-forecast/blob/master/images/lambda_function.png) | ||
|
||
# AWS Architecture | ||
![AWS Architecture](https://github.com/jimzucker/aws-forecast/blob/master/images/aws_architecture.png) |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.