8000 GitHub - Yota-K/aws-cost-notification
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Yota-K/aws-cost-notification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS cost notification

AWSのコストを月1でLINEに通知するLambda関数。

環境構築

cp sample.env.json env.json
{
  "LINE_ACCESS_TOKEN": "LINEのアクセストークン",
  "OPEN_EXCHANGE_RATES_APP_ID": "Open Exchange RatesのアプリケーションID"
}

ローカル実行

make buildでビルド後に以下のコマンドを実行する。

make local_invoke

デプロイ

初回デプロイ時に以下のコマンドを実行して、samconfig.tomlを作成する。

sam deploy --parameter-overrides LineAccessToken=$LINE_ACCESS_TOKEN OpenExchangeRatesAppId=$OPEN_EXCHANGE_RATES_APP_ID --guided

デプロイを実行する。

make deploy

samconfig.tomlについて

AWS SAM CLIの設定ファイルであり、samコマンドを使用する際の設定が定義されたファイル。 sam deploy --guided コマンドを使用した際にプロジェクトのルートディレクトリに自動生成される。

デプロイに関する設定が記述されており、parameter_overridesにデプロイ時に渡すパラメータが記述することで、環境変数を渡すことができる。

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0