GithubHelp home page GithubHelp logo

kuronekomichael / aws-lambda-cdk Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 1.2 MB

CDKサンプル: esa.ioの利用状況をSlackへ出力するLambda をCDKで作るマン

JavaScript 55.24% TypeScript 44.76%

aws-lambda-cdk's Introduction

CDKサンプル

esa.ioの利用状況をSlackへ出力するLambda をCDKで作るマン

Prerequirement

cdkがないと始まらない

npm install -g aws-cdk

Setup

最初にデプロイ用のs3バケットを作ったりしないといけないので作る

cdk bootstrap

予め、SSM(Systems Manager)のパラメタストアに値を保存しておく

# (1) esa.ioのAPIトークンをSSMに保存する
aws ssm put-parameter \
    --type 'SecureString' \
    --name '/CDK/EsaStats2Slack/ESA_API_TOKEN' \
    --value 'klsjafdkl89kjfsdaklj_dfksa83_fdas3-asdfkljraw_sdva'

# (2) SlackのWebHookURLのトークンをSSMに保存する
aws ssm put-parameter \
    --cli-input-json '{"Name": "/CDK/EsaStats2Slack/SLACK_WEBHOOK_TOKEN", "Type": "SecureString",  "Value": "GSsfaadseeFTT/GDTgasdfga/fsdf2i2i", "Description": "Incomming Webhook token for xxxxx.slack.com"}'

Deploy

cdk deploy

Screenshot

毎月末のAM10:00に、Slackにesaの利用者と所属チームが出力される

aws-lambda-cdk's People

Contributors

kuronekomichael avatar dependabot[bot] avatar

Watchers

 avatar James Cloos avatar

Forkers

lgtm-migrator

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.